Commit graph

62 commits

Author SHA1 Message Date
Sanchayan Maity 818a34a7ff nvim: lsp: Enable flake8 & pylint for pylsp
See documentation
https://github.com/python-lsp/python-lsp-server/blob/develop/CONFIGURATION.md
2021-12-06 10:28:30 +05:30
Sanchayan Maity 3be8a76fe7 nvim: lsp: Drop support for lua
We had added lua-language-server thinking it would be helpful for
Wireplumber development, but, due to the nature of lua and server
itself, the experience is utter crap in comparison to using LSP in
other languages.
2021-11-28 17:53:49 +05:30
Sanchayan Maity 49cf726ce0 nvim: plugins/lsp: Drop null-ls
See the below issue
https://github.com/jose-elias-alvarez/nvim-lsp-ts-utils/issues/87

We went with null-ls because we wanted formatting with prettier. Also
null-ls was recommended by nvim-lsp-ts-utils.

The advantage of null-ls is it provides formatting and diagnostics
together in one package.

However, we will get prettier by another means and for linting switch to
nvim-lint.
2021-11-28 17:53:42 +05:30
Sanchayan Maity 6ead0d94a7 nvim: lsp: Fix missing capabilities for tsserver
We missed setting this when enabling inlay hints.
2021-11-20 17:00:14 +05:30
Sanchayan Maity 8733194431 nvim: lsp: Update the key mapping for code lens
We missed the fact that this conflicts with our gl mapping of HopLine
which we added recently.
2021-11-18 17:15:30 +05:30
Sanchayan Maity cc75f12e3f nvim: lsp: Enable inlay hints for TypeScript/JavaScript 2021-11-17 11:13:14 +05:30
Sanchayan Maity e07afd2c65 nvim: lsp: Never insert #include directives as part of code completion for clangd 2021-11-08 12:31:17 +05:30
Sanchayan Maity af7461452c nvim: lsp: Enable LSP document highlight 2021-10-20 13:01:21 +05:30
Sanchayan Maity a83b07959d nvim: lsp: Drop lsp_signature
The signature help sometimes stays open even after moving away from
the function. Sometimes it conflicts with the auto completion pop-up
making it difficult to see one of the two windows.
2021-10-11 13:28:07 +05:30
Sanchayan Maity 25059ef623 nvim: lsp: Enable some additional key mappings for code actions 2021-10-10 11:57:15 +05:30
Sanchayan Maity b04ecb9541 nvim: lsp: Remove redundant capabilities settings
The required capabilities to be set are already correctly set by
nvim-cmp, no need to set them again. We had added that to enable rust
snippet expansion earlier.

Also see older revisions of this document.
https://github.com/neovim/nvim-lspconfig/wiki/Snippets
2021-10-03 12:46:40 +05:30
Sanchayan Maity cf78dcae4d nvim: lsp: Fix diagnostic errors 2021-10-02 18:49:02 +05:30
Sanchayan Maity 8aa4fc2f76 nvim: lsp: Enable shellcheck as diagnostics source for null-ls 2021-10-02 18:29:57 +05:30
Sanchayan Maity 068dfcd4b9 nvim: lsp/keymappings: Move the diagnostic key mappings outside of LSP
vim.diagnostic framework is now available and can be used outside of
LSP. This means the same functions can now work for plugins providing
diagnostics via this framework like nvim-lint and null-ls.
2021-10-02 18:29:57 +05:30
Sanchayan Maity 0a21f7d979 nvim: lsp: Explicitly set the log level 2021-09-30 13:55:49 +05:30
Sanchayan Maity 8aaccc4f16 nvim: lsp: Refactor and alignment clean ups 2021-09-27 18:46:55 +05:30
Sanchayan Maity be02b5ead7 nvim: Switch to nvim-cmp
nvim-compe has been deprecated. While we tried to make it a few days
without any completion support, in javascript/typescript could not get
the default omnicompletion to work at all. It is possible that this
could be due to nvim-lsp-ts-utils/null-ls but who is gonna debug.

Also tried MUcomplete but it just would not work. There are open issues
on this. See https://github.com/neovim/neovim/issues/12390 and also
https://github.com/lifepillar/vim-mucomplete/issues/179.

So here we are with nvim-cmp. Some observations in comparison to compe
before. Using buffer completion seems not possible as most of the times
LSP completion items then do not turn up. Do not know if this is server
specific but at least it is the case with Rust. compe seemed better
performance wise especially in tsserver and considering the buffer
problem mentioned above. Also, even with vsnip added as the completion
source can't seem to get any snippet specific completions working.

Could have ditched all completion support if I did not have to use
tsserver but need it for work currently. So we will stick to enabling
this and hopefully it improves in future.

Fuck nodejs, javascript and typescript.

For references see,
https://github.com/kristijanhusak/neovim-config
https://github.com/sQVe/dotfiles/tree/master/config/nvim
2021-09-27 16:29:18 +05:30
Sanchayan Maity b95a14b8d1 nvim: lsp: Fix enabling of range format support again!
47b1578 did not actually fix it. We need to keep using 'gq' but actually
correctly specify whether we want normal or visual mode. Also disable
range formatting explicitly for tsserver.
2021-09-27 15:23:12 +05:30
Sanchayan Maity 00670a867f nvim: lsp: Enable rust-tools for inlay hints 2021-09-27 12:31:27 +05:30
Sanchayan Maity f7d12b27d3 nvim: lsp: Alignment cleanup 2021-09-26 11:50:36 +05:30
Sanchayan Maity 47b157805d nvim: lsp: Fix enabling of range format support
If range formatting is supported we should check that first to enable
it else since most LSP servers support formatting, without range
formatting check being first, it would never be enabled.
2021-09-25 18:21:51 +05:30
Sanchayan Maity 8801b26fa9 nvim: lsp: Add range formatting with motion 2021-09-25 15:26:52 +05:30
Sanchayan Maity eebffce98e nvim: lsp: Add back custom preview function
Follow up to 469e367.
2021-09-25 15:26:52 +05:30
Sanchayan Maity f01b1d6a52 nvim: lsp: Use Leader k mapping for LSP hover
While at it, align code to look nice.
2021-09-25 15:13:49 +05:30
Sanchayan Maity 616c4f003c nvim: lsp: Increase value of debounce didChange notifications 2021-09-25 13:21:01 +05:30
Sanchayan Maity 469e36756b nvim: lsp: Drop custom preview function
Those functions do not work anymore. May be we will add it later
via https://github.com/rmagatti/goto-preview.
2021-09-25 13:21:01 +05:30
Sanchayan Maity 9ab36d4b1b nvim: lsp: Fix null-ls setup 2021-09-25 13:21:01 +05:30
Sanchayan Maity 5b6685b165 nvim: lsp: Enable clangd for C and C++ 2021-09-10 14:06:59 +05:30
Sanchayan Maity 555026ef80 nvim: lsp: Sync nvim-lsp-ts-utils settings with upstream 2021-08-31 11:02:34 +05:30
Sanchayan Maity bdc14d4ebc nvim: Add lightbulb for discoverable LSP code actions 2021-07-26 18:44:41 +05:30
Sanchayan Maity 3e7fd609ec nvim: lsp: Sync nvim-lsp-ts-utils configuration with upstream 2021-07-21 11:00:40 +05:30
Sanchayan Maity c646381a00 nvim: lsp: Add support for lua 2021-07-17 18:38:32 +05:30
Sanchayan Maity 4565822924 nvim: lsp: Switch to pylsp
pyls is deprecated and not supported in nvim-lspconfig anymore.

The supported python language server is here.
https://github.com/python-lsp/python-lsp-server
2021-07-15 18:13:52 +05:30
Sanchayan Maity 7fb370f824 nvim: lsp: Enable code lens support
Relevant PR
https://github.com/neovim/neovim/pull/13165
2021-06-15 15:41:28 +05:30
Sanchayan Maity 511d5a17aa nvim: plugins: Add plenary and null-ls
nvim-lsp-ts-utils now has plenary and null-ls as a requirement.
2021-06-10 10:30:27 +05:30
Sanchayan Maity 7383245dd3 nvim: plugins/lsp: Add nvim-lsp-ts-utils 2021-05-24 17:20:23 +05:30
Sanchayan Maity e24fc200ec nvim: Add support for using snippets 2021-05-13 21:07:42 +05:30
Sanchayan Maity ca46007f89 nvim: lsp: Debounce didChange notifications to the server 2021-05-13 21:07:42 +05:30
Sanchayan Maity c768cd89f1 nvim: lsp: Remove LSP workspace mappings
We never seem to need those.
2021-05-12 18:06:12 +05:30
Sanchayan Maity 91604ca16c nvim: lsp/plugins: Add support for automatically showing fn signature 2021-05-08 14:39:58 +05:30
Sanchayan Maity e8ef3a4ded nvim: lsp: Enable typescript language server
Need it for some work stuff :(.
2021-03-10 21:36:55 +05:30
Sanchayan Maity 3707429737 nvim: lsp: Update LSP key bindings 2021-02-25 17:53:45 +05:30
Sanchayan Maity 7360f65e2f nvim: lsp: Enable python language server 2021-02-25 17:35:50 +05:30
Sanchayan Maity a18a122b97 nvim: lua: lsp: Drop lspfuzzy
Now that we are using nvim-bqf, we have a nicer interface to quickfix
list and nvim-bqf also integrates fzf mode. So drop lspfuzzy.
2021-02-02 20:28:51 +05:30
Sanchayan Maity cb6eef2314 nvim: lua: lsp: Drop lsp-status
We use galaxyline for the status line and it already provides
LSP diagnostics info. So drop lsp-status. While the progress
message during the loading in status line is nice, may be will
incorporate it later by picking only the required pieces.

While at it, expose all diagnostics via statusline using galaxyline
components.
2021-02-02 20:13:07 +05:30
Sanchayan Maity 9918959aa2 nvim: Switch to nvim-compe 2021-02-02 18:09:35 +05:30
Sanchayan Maity 6ef47458e2 nvim: lsp: Move the completion item symbols from completion-nvim to LSP 2021-02-02 17:33:21 +05:30
Sanchayan Maity 1dbb82fc49 nvim: Update LSP status configuration variables 2021-01-27 09:13:47 +05:30
Sanchayan Maity 62553ba8c7 nvim: plugins/lua: Add lspfuzzy 2020-12-14 17:16:28 +05:30
Sanchayan Maity eb8346e80f nvim: lua: lsp: Add support for incremental sync
Support for incremental sync landed in neovim with this MR.
https://github.com/neovim/neovim/pull/13371
2020-12-09 10:14:18 +05:30