refactor: Actually clean up cfg conditionals

• in the last commit, I modified how the
	  configuration is made so that I could get
	  rid of having to check if configuration
	  options were present before acting. I
	  forgot to remove one, so I did it here

	• I also removed a reference to an
	  experimental option that I was considering

	• updated readme
main
McAuley Penney 2 years ago
parent 889dc71f20
commit 30bd92bb51

@ -12,7 +12,7 @@ on every `BufWritePre`.
## About
I originally wrote this as a wrapper around a couple of vim regex commands used for formatting files before I began using formatters. These commands are not mine, please see the `Credits` section below for sources. Even with real formatters in my setup now, I still like and use this because I like these specific formats to be applied to every buffer and don't want to have a formatting tool installed for them. There really isn't a reason to have this in a plugin other than wanting to disseminate it for new users or people who didn't know you could do this. You could (should) instead just yank and put the code right in your configuration.
I originally wrote this as a wrapper around a couple of vim regex commands used for formatting files before I began using formatters. These commands are not mine, please see the `Credits` section below for sources. Even with real formatters in my setup now, I still like and use this because I like these specific formats to be applied to every buffer and don't want to have a formatting tool installed for them.
## Installation
@ -28,12 +28,12 @@ use({
```
## Configuration
Tidy will work on all buffers using only the basic installation shown above. All configuration options are optional and there are no defaults. The options displayed below are simply examples.
Tidy will work on all buffers using only the basic installation shown above. No configuration options are required. The options displayed below are simply examples.
```lua
require("tidy").setup({
filetype_exclude = { "markdown", "python" },
})
})
```

@ -11,10 +11,6 @@ local function list_to_set(list)
end
local function is_excluded_ft(opts)
if not opts.filetype_exclude then
return false
end
local ft = vim.api.nvim_buf_get_option(0, "filetype")
local ft_set = list_to_set(opts.filetype_exclude)
@ -44,7 +40,6 @@ function M.setup(opts)
local defaults = {
filetype_exclude = {},
newline_at_eof = false
}
opts = vim.tbl_extend("force", defaults, opts or {})

Loading…
Cancel
Save