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.
Some language servers like HLS take longer to attach and if we exit
soon before LSP attach had a chance to finish (may be?), server
capabilities field does not seem to be valid in client object and
we get the below error. Check if it valid first.
Error detected while processing LspDetach Autocommands for "*":
Error executing lua callback: /home/core/.config/nvim/lua/lsp.lua:215: attempt to index field 'server_capabilities' (a nil value)
stack traceback:
/home/core/.config/nvim/lua/lsp.lua:215: in function </home/core/.config/nvim/lua/lsp.lua:209>
[C]: in function 'nvim_exec_autocmds'
/usr/local/share/nvim/runtime/lua/vim/lsp.lua:1140: in function </usr/local/share/nvim/runtime/lua/vim/lsp.lua:1139>
Error executing lua callback: /home/core/.config/nvim/lua/lsp.lua:215: attempt to index field 'server_capabilities' (a nil value)
stack traceback:
/home/core/.config/nvim/lua/lsp.lua:215: in function </home/core/.config/nvim/lua/lsp.lua:209>
[C]: in function 'nvim_exec_autocmds'
/usr/local/share/nvim/runtime/lua/vim/lsp.lua:1140: in function </usr/local/share/nvim/runtime/lua/vim/lsp.lua:1139>
Since we now have more mapping available after dropping treesitter
text objects, we can fix this.
Fixes the below warning from targets check health.
targets: health#targets#check
========================================================================
- WARNING: Conflicting mapping found:
aq → <Plug>(textobj-wordcolumn-word-a)
q → {'quote': [{'d': ''''}, {'d': '"'}, {'d': '`'}]}
- WARNING: Conflicting mapping found:
iq → <Plug>(textobj-wordcolumn-word-i)
q → {'quote': [{'d': ''''}, {'d': '"'}, {'d': '`'}]}
The whole bunch of treesitter text objects were difficult to remember
and we ended up rarely ever using any of the defined mappings.
treehopper simplifies things with a single mapping and hints.
We seem to be making a lot of mistakes when it comes to handling
docs/comments in merge requests. Use a more prominent white colour
for the comment highlight group.
Disable logging completely. The set_log_level call needs to be at the
top level else some log message related to startup still gets logged
if the call is done in on_attach.
Upstream repos overwrite tags like release and then PackerSync complains
about failing to update since existing tags would be clobbered after an
update.
Use the new vim.lsp.start API and LspAttach/Detach auto commands.
Drop nvim-lspconfig in the process.
LSP server specific configuration has been taken from nvim-lspconfig.
We do not use any of the other features provided by rust-tools and
only ever needed the inlay hints. Now that there is a plugin for
that which also allows us to use inlay hints for other languages
use that.
There are two options
https://github.com/lvimuser/lsp-inlayhints.nvimhttps://github.com/simrat39/inlay-hints.nvim
The second one is from the rust-tools author himself but we could
not get that to work.
The rebase abort mapping is not really required as fugitive already
provides the `ra` mapping when in git status window to abort rebase.
Use the `gr` mapping for git grep and `gR` for rebasing to origin.
The plugin is in maintenance mode and typescript.nvim does not support
inlay hints. We already use eslint language server and extra commands
provided by lsp-ts-utils/typescript.nvim is something we have never
used. Just drop it.
vim.lsp.buf.formatting function is deprecated and now replaces all the
below three functions with vim.lsp.buf.format.
- vim.lsp.buf.formatting
- vim.lsp.buf.formatting_sync
- vim.lsp.buf.formatting_seq_sync
client.resolved_capabilities is no longer used. One must now access
client.server_capabilities which matches the same structure as the
protocol.
https://microsoft.github.io/language-server-protocol/specification
See neovim commit c618b31.
With commit 7e41cd7 entering in dirvish does not work if bufhidden is
not hide or empty. Set it to hide and using BS which is mapped to C-^
in our key mappings, we can go back to the previous buffer.
We specify an underline cursor shape in terminal settings. This actually
fixes 5c6eebf where we just copied the settings from the referenced
issue but did not actually fix it.
The epoch time under cursor may be in milliseconds or seconds. Use
visual selection to select epoch since we won't know which. Else when
the epoch was in milliseconds we would just get wrong results.