Stopped enforcing a different indentation size for C files, it now uses
the same 4 character width as for other filetypes.
Also, instead of hardcoding the value of softtabstop to the same value
as shiftwidth, set it to a negative value; which makes it behave exactly
like that, according to documentation.
When restoring the cursor to last file's position, there was an
inconsistency between Neovim and Vim for commit files. That was because
Neovim's defaults didn't properly detect the filetype in such cases.
The current patch corrects that with a recipe copied from Neovim's help
docs.
Added a hook to also install some flake8 plugins immediately after Mason
successfully installs the python-lsp-server. This step saves some
after-installation setup.
Also, set some new defaults to Ruff linter. This new defaults have the
intention to mimic just the behavior in Flake8 and Pylint, as long as
Ruff implements the missing error codes.
Instead of having codes commented out in the LSP configuration file, as
all specific settings of the linters are being moved into the
corresponding configuration file, move all the accompanying comments as
well.
The moved commented-out settings are there as a reference, but now it
makes more sense to preserve that reference in the correct configuration
file.
Instead of having codes commented out in the LSP configuration file, as
all specific settings of the linters are being moved into the
corresponding configuration file, move all the accompanying comments as
well.
The moved commented out settings are there as a reference, but now it
makes more sense to preserve that reference in the correct configuration
file.
Flake8 can read its settings from various sources (user's config files,
project's config files, pyproject.toml with a plugin). Having this
setting in the LSP setup overrides many of those other sources (mainly
when Flake8-pyproject is used).
Another advantages of this approach is that having Flake8's settings in
its own files, other editors can benefit from the same settings, no
extra configuration required; and setting the LSP server becomes
simpler.
There is no need to have pycodestyle as a configuration source since its
been disabled, as all the checks are covered by Flake8.
Instead, having Flake8's as a configuration source only, makes more
sense either having those settings read from the user's config files or
from the project's one.
Instead of having the pylsp plugins command hard-coded, compute it from
Neovim standard installation paths. Also enabled Ruff plugin as default
linter for pylsp
Instead of manually running PylspInstall to have some pyslp plugins
installed, install them via configuration on successfully installation
of the LSP server.
As this module is the main entry point of all the LSP servers
configurations, it makes sense to rename it as init.lua and place it
under the directory grouping all the LSP related modules.
To give less sensation that only the settings key is configured within,
as some servers only accept parameters via the `cmd` key, for instance,
the file has now a more general name.
The remaining file for setting up Neovim as an LSP client, that was
still as vim-script, was already invoking all Lua functionality embedded
as a here-doc in vim-scrip.
It made more sense to finally migrate that one file, and call `lua require`
instead of `runtime!` when invoking inside `init.vim`.
Instead of adding some hook that secretly changes the command line for
the LSP server underneath, achieve the same behaviour but passing
options on server initialization.
Around an year ago, the capabilities for the `nvim-cmp` plugin have been
updated and there is a new default in Neovim. This change uses that new
default according to documentation from `nvim-cmp` plugin.
Added LSP servers' configurations for Rust and Haskell. Both languages
have been recurrently used and there is no reason not to include them in
default settings.
Now that code looks cleaner and there are less things going around, made
the different LSPs servers setups explicit. With this change there is a
clear picture of which LSP requires extra/custom options and which
don't.
Setting the completeopt option when initializing nvim-cmp is no longer a
standard recommendation from their docs. Since nvim-cmp has its own
completion menu, and as long as that menu is used instead of
`<C-x><C-o>` to launch the native ins-completion menu, there is no need
to change the default behavior of the option.
This was discussed here:
https://github.com/hrsh7th/nvim-cmp/discussions/941https://github.com/hrsh7th/nvim-cmp/pull/1442
This setting corresponds to setup need specifically by the nvim-cmp
plugin for working as a source within Neovim's ins-completion
(https://neovim.io/doc/user/insert.html#ins-completion) but otherwise
not needed to be set to something different than its default.
For local imports of modules, move the corresponding definitions into
module's scope, instead of restricting their declaration to the
function/s where they are later used.
With this change, one same import can be reused in different parts of
the module.
As this auto-command is meant to configure how nvim-cmp provides
completions for the specific gitcommit file type, those settings belong
to the completions Lua module.
The lspkind settings only apply to the completion menu, then, it makes a
lot more sense to have those settings in the same auto-command as the
rest of settings related to completion, specially because all those
settings are related to the same plugins family (nvim-cmp).