Dynamic capabilities were introduced in neovim with commit ddd92a7.
With dynamic registration of LSP capabilities, a client's `server_capabilities`
is no longer a sufficient indicator to see if a server supports a feature. We
instead need to use `client.supports_method(<method>)` which considers both
the dynamic capabilities and static `server_capabilities`.
Drop nvim-lightbulb and just add the needed functionality. This also
fixes a minor bug where the code action detection was incorrectly
being done under codeLensProvider instead of codeActionProvider.
mini.jump module does not give multiple hints when moving on the
same line like hop use to. Use the jump2d module to achieve this
functionality. This makes it easy to jump forward or backward on
the same line with just one hop instead of having to press f/F
multiple times which is just annoying and stupid.
Define functions in a consistent way through out. We like the pattern
`local function_name = function()` instead of `local function_name()`
for defining functions.
4468c8b made PureScript use Haskell for treesitter queries. However,
setting them up globally sometimes seems to result in Haskell files
getting identified as PureScript and triggering a PureScript LSP
server attach. At least that's what the behaviour seems like.
To prevent this, register the usage of Haskell treesitter queries
in ftplugin viz. when PureScript file type is detected.
We drop Comment, hop & vim-surround in favour of modules from mini.
This change is triggered by the fact that hop's author has decided
to not maintain it any more. There is also pounce but mini seems
simple and we can also use other modules it provides.
With this set to true, neovim will run `:h syntax` and tree-sitter
at the same time. Using this option may slow down one's editor and
one may see some duplicate highlights. Disable it.
We missed setting this and it gives an error like below when using
HLS and rust-analyzer.
```bash
LSP[rust-analyzer]: Error SERVER_REQUEST_HANDLER_ERROR: "/usr/local/share/nvim/runtime/lua/vim/lsp/_watchfiles.lua:199: attempt to index field 'capabilities' (a nil value)"
```
Recent changes to auto-session which got added with session lens
support are just plain annoying. It adds telescope support which
broke session loading as we do not use telescope. It has started
creating session files which we do not want and there seems to be
no setting to disable them or at least if there is it is not at
all obvious from the documentation. Just nuke this nonsense.
Since we reverted cabal-fmt support via HLS in the previous commit
add the cabalfmt plugin. Just add it to our own ftplugin instead of
adding via the plugin list.
This reverts commit 34a5bbdacb.
HLS complains a lot (forgot the error) when trying to edit cabal files
making it almost unusable. It was nice to not require a separate plugin
for formatting cabal files, but, since this is not usable, disable it.
This allows us to have all the language server configuration in one
place and only import relevant LSP server configuration to pass to
vim.lsp.start in after/ftplugin.
While at it, we also enable deno support.
Packer does not seem to be maintained. Version 2 being developed
by Lewis @ https://github.com/lewis6991/packer.nvim has breaking
changes. Migrating to Lazy will open it's own can of worms & it
does not use packages. Funny thing is author of Packer himself
uses Lazy.
We really should not be needing anything fancy. neovim can load
packages automatically from packpath. All we need is something
which will clone the packages to packpath and all those will be
automatically loaded.
paq.nvim which we were using before packer was the right choice
and does the bare minimum we stated above.
Rest all with features like fancy lazy loading is nonsense.
Do not make packer optional and remove use of after, cmd, config,
run and requires.
This is in preparation for testing if we can move off the plugin
manager and use in built packages support for handling packages.
While at it, drop unnecessary comments.
This reverts commit 058c37882d.
It is still helpful to have this it seems as without this working on
projects which do not have editorconfig becomes a pain.
clipboard support just seems to be completely flaky right now. Add
previous settings but instead of tmux specific commands use wayland
clipboard tools.
This should make it work everywhere. One downside of this setting is
we go back to polluting system clipboard every time & does not really
matter if we copy to + or * register. Both will result in a call to
wl-copy.