-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an option to skip certain filetypes. #2
base: main
Are you sure you want to change the base?
Conversation
trailing spaces to indicate new line.
If this gets approved, I think there should be an update to the repo's README.md file with config that can be used in a dedicated config file that can be sourced by init.lua If someone wanted to do multiple exclusions, it can be messy to add these to the Packer Use Lua (in the way the included example does). |
@@ -19,6 +19,11 @@ local function stripWhitespace(top, bottom) | |||
return | |||
end | |||
|
|||
-- print(vim.inspect(require("spaceless").options.ignore_filetypes)) | |||
if vim.tbl_contains(require("spaceless").options.ignore_filetypes, vim.api.nvim_buf_get_option(0, "filetype")) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if vim.tbl_contains(require("spaceless").options.ignore_filetypes, vim.api.nvim_buf_get_option(0, "filetype")) then | |
if vim.tbl_contains(M.options.ignore_filetypes, vim.bo.filetype) then |
@@ -83,9 +88,15 @@ local function onBufEnter() | |||
end | |||
end | |||
|
|||
local M = {} | |||
local M = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this to the top.
For example, markdown's trailing spaces has special meanings.