Neovim's 0.10.0 has been released. Because of that, all sub-modules are
being bumped to their current version and saved as the starting version
point for the current sable release.
Minor refactoring in settings. Also removed settings that were already
set to their default.
The `window.commandCenter` default is `true` when the custom title bar
is enabled.
This repository no longer uses an Atom syntax highlighting, instead the
default Dark+ is used for all editors (Vim/Neovim included); so there is
no need for that setting anymore.
The other unused setting is the toggle of the menu-bar, that is really
unnecessary now, in terms of vertical spaced wasted/gained when using
the custom title-bar setting. It is a cleaner view to have it with
“toggle”, but is minimal.
Some Python settings were part of the Text Editor's core settings, such
as the several Python linters.
The new approach from the editor is to move out all those
functionalities as extensions, and as such, many settings had their keys
changed, or completely removed if, for instance, it was only an “enable”
setting and now that is assumed when the extension is installed
explicitly.
The documentation about this migration is here:
https://github.com/microsoft/vscode-python/wiki/Migration-to-Python-Tools-Extensions
Added context plugins that keep block-starting lines at the top of the
editing window, to have some context of where is located the code one is
editing.
Removed the first-line a warning/error occurs, info from the status-line
for both, Neovim's LSP server and Vim's CoC. That information can be
obtained when going through the quickfix list of diagnostics, instead of
seeing only the first and then the second, if the first gets fixed.
Also, as a bonus, enabled the global-status-line setting in Neovim.
If using the Symbols Only version of the NerdFonts, prioritize that
fontface in order for it's glyphs to appear prior other fonts using the
same codes.
This patch still relies on an unpatched fontface for monospaced fonts,
but adds immediately, as a second option, the fontface of symbols from
NerdFont.
Some movements, selection, etc. from Vim, usually don't work properly
when trying to detect the start/end of functions/classes scope and other
languages symbols when, for instance, language blocks are not
curly-bracket-based.
This Tree-sitter plugin aims to solve those issues using the AST of the
source file.
Although it is nice to see the corresponding GNU/Linux distro logo in
the status bar; there is no relation between Debian, Fedora, Arch, etc,
and the file having UNIX line endings.
This patch anonymizes that by making the status bar show just a Tux then
the file has UNIX line-ending terminations.
Vim's plugin auto-pairs has been unmaintained for several years now. A
new project has risen as a fork of the original one.
This patch uses the new fork and sets some defaults existing in the
previous plugin.
indentLine has had support dropped since mid-2023. There is no
replacement that works on both Neovim and Vim; but almost the same
behavior can be achieved with `listchars` and some autocmd magic.
So the plugin is getting removed as dependency from this repo.
indentLine is archived since last year and with that, there are no
further updates. But the project's GitHub states that the same behavior
can be achieved with Vim's listchars, so this patch does that.
The override in place for Python classes highlighting wasn't having
effect. The issue is that now user queries need to explicitly extend,
with the keyword `;extend` the scheme rules they are overriding.
Changed the hard-coded virtual environment directory name used to look
for Python related binaries to whatever directory is defined in the
`VIRTUAL_ENV` environment variable. That variable's value is more
reliable, even more when Python virtual environments are located in a
central location, not near the repository.
Test for new executables, for different checkers, for Python LSP only if
the virtual environment directory has been found.
The previous behavior could have found executables for such linters on
different places, as they could have been appearing outside a virtual
environment directory (if the `venv_dir` variable tested as an empty
string). Such behavior could lead to undefined behaviors.
On most Linux distros python3 is the default, even more, there is no
Python version 2 to be installed anyways, hence there is no need to
distinguish which python version to load anymore.
The default python executable has come to be `python` even though the
Python version is 3.x. Furthermore, on all virtual environments
`python` exists and is linked to point to a Python 3.x executable.
Third-party installed plugins are enabled by default, hence there is no
need to explicitly enable it.
Ruff plugin doesn't come with standard PyLSP, and is one (along with
pylsp-mypy) of the manually added plugins.
When possible, for pre-commit hooks, instead of receiving arguments via
command line, make them read their config from a configuration file to
achieve the same behavior as invoking the corresponding tool outside
pre-commit.
Some of the arguments in the pip-tools hook were for an older version of
the hook, which didn't work with pyproject.toml files.
Since Python 3.6 is long deprecated now, the template is being bumped at
least to the 3.7 version.
For the pre-commit-config.yaml added the Ruff hook and, as Ruff is being
configured via TOML file instead of inline command line arguments, also
added the toml checker.
Although the block of code moved is programmatic configuration taking
place before the actual on/off of settings (which could be interpreted
as metadata config), the block of code in question had nothing to do
with the setting of other LSPs than PyLSP.
The whole block is for pre-installing plugins for PyLSP server, or its
plugins'.
As the `--pretty` flat for Mypy provides nicer output, the soft word
wrap it uses makes editors receive part of the message. Hence the
setting has to be overridden inside editors (the flag is kept on
because invoking Mypy from terminal benefits from the extra output
information).
Some Pylint settings that are more probable to occur on medium-big
projects were move to the pyproject.toml template, in order to have it
near when a new project is started.
On the other hand, those checks were never going to be on for regular
Python programming.
The deleted line was already commented out. There is no need for the
line anyways as the mccabe plugin comes already disabled by default.
Furthermore the option is a duplication, enabling the plugin and setting
a value to the `threshold` has the same effect as setting the
`maxComplexity` value on Flake8's plugin.
The only distinction is McCabe came, when enabled, with a default preset
value of 15 for `threshold`, which Flake8 hasn't for `maxComplexity`.
In order to make Ruff report, the best way possible, mimicking the
reports provided by both Flake8 and Pylint, disable some of the checks
that the latter linters don't have turned on by default.
Previously used syntax for adding Melpa's repository to Emacs was taken
from Melpa's site itself. But some of those commands have become
standard Emacs that load on Emacs startup. This changes are to make use
of newer techniques for incorporating 3rd party repos into Emacs.
Eglot's configuration for LSP servers does not have a “false” literal in
Lisp. Furthermore, the previously used `nil` value was being mapped to
JSON's `null` value instead of `false`; making the LSP server to load
defaults for those settings instead of setting those settings to false.
Changed mypy configuration INI format. Python's configparser checks
boolean values in a case-insensitive manner, so it doesn't matter if
values start in Title-case or lower-case. This way, the configuration
is easily translated to TOML format for writing a pyproject.toml file;
with the exception of string values which will have to be enclosed in
quotes anyways.
Similar to a plugin manager, Emacs has Elpa and Melpa repos. Here,
Melpa repository is being added and then some packages (themes and
languages' modes) provided by that repo.
As with previous change, the custom-set-font interface reorders stuff
it's own way. Moving this settings outside that scope makes the
settings stay put.
Emacs customization interface has it's own way to sort settings out.
With this change, the same settings' effects are achieved manually
without having to rely on the internal sorting the customize interface
intends.
Changed mypy configuration file format from INI to TOML. It works all
the same and in this way there are more similarities with the format
inside pyproject.toml file.
The function that added nice text for folded blocks was reverted in
https://github.com/neovim/neovim/pull/27217 in favor of the default text
generated by setting the folding-text option to `""`.
Now, the automatic pop-up that appears when the cursor is idle, appears
en both, Normal and Insert modes; and only displays messages under the
cursor, not the entire line.
For the other behavior, there is still the keybinding `<space>`+`e`.
Added a newly found Pylint message that's duplicated by pycodestyle (via
Flake8).
This message wasn't on the documentation but has a PR and is awaiting
approval.
The purpose of this Makefile and base.mk files are to emulate the
behavior of command `make` when only given a build target (inferring the
source file to use); but using instead a custom set of building flags.
base.mk holds those custom set of building flags, Makefile is just the
wrapper to add get the target name and source file.
In order to achieve the same linting as when compiling a C project, use
those default compilation options for linting inside text editors that
support clangd LSP.
As some parts of the configuration are meant to work on the current
pre-release version. To make the settings work on current release
version there were added some guards around the experimental code.
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.
2024-01-05 14:52:15 -03:00
67 changed files with 653 additions and 219 deletions
-- For plugins here to work properly refer to https://haskell-language-server.rtfd.io/en/latest/support/plugin-support.html#current-plugin-support-tiers
-- This documentation tells which GHC versions won't work for each plugin
# Linkable as $XDG_CONFIG_HOME/pylintrc (without the extension). Pylint
# ignores the category and loads the settings anyways.
[tool.pylint.format]
max-line-length=79
[tool.pylint."messages control"]
disable=[
# Covered in flake8 according to https://pylint.rtfd.io/en/latest/faq.html#which-messages-should-i-disable-to-avoid-duplicates-if-i-use-other-popular-linters
"PLW2901","PLR2004",# From Pylint plugin, not enabled by default
"PLR0912",# Already covered: mccabe (C90)
]
[tool.ruff.lint.per-file-ignores]
"__init__.py"=["F401"]
[tool.flake8]
# This category requires “Flake8-pyproject” plugin to take effect
max-line-length=120
per-file-ignores=[
"__init__.py:F401",
]
[tool.pylint.format]
max-line-length=120
[tool.pylint."messages control"]
disable=[
# Covered in flake8 according to https://pylint.rtfd.io/en/latest/faq.html#which-messages-should-i-disable-to-avoid-duplicates-if-i-use-other-popular-linters