Commit graph

384 commits

Author SHA1 Message Date
Sanchayan Maity 420d643338
nvim: lsp: Inlay hints API has changed
With the recent change to the API, without passing buffer number as
0 for the current buffer, inlay hints gets enabled for all buffers.
2024-05-06 19:22:01 +05:30
Sanchayan Maity dc40ccac1e
nvim: keymappings: Remove diagnostic mappings which are now default 2024-04-27 11:36:41 +05:30
Sanchayan Maity cb46c82d53
nvim: lsp-utils: Use new vim.fs.root function for getting root directory
38b9c322c9
2024-04-25 16:17:36 +05:30
Sanchayan Maity 5623d7c004
nvim: lsp: Inlay hints API has changed 2024-04-19 11:07:28 +05:30
Sanchayan Maity 767ae28f4f
nvim: plugins: Drop gitsigns 2024-04-08 14:49:42 +05:30
Sanchayan Maity 97bdd3d9e1
nvim: lsp-utils: Enable HLS for cabal files 2024-04-04 15:10:03 +05:30
Sanchayan Maity 86747c619d
nvim: Add support for lean
Tree sitter queries are copied over from lean.nvim.
2024-02-19 21:00:13 +05:30
Sanchayan Maity 384eed0b5c
nvim: treesitter: Add parsers for C, lua, vim & vimdoc
We were getting errors on trying to open vim help files. As per
nvim-treesitter, parsers for C, lua, query, vim & vimdoc should
always be installed.
2024-01-09 12:45:54 +05:30
Sanchayan Maity d974be35c2
nvim: lsp-utils: Update Haskell LSP settings
checkProject if set to true, type checks the entire project on initial
load. If activated by default which it is, can lead to bad performance
in large projects.
2024-01-07 20:19:20 +05:30
Sanchayan Maity b2e66cbff4
nvim: Use monokai colour scheme 2024-01-01 22:34:17 +05:30
Sanchayan Maity 07f81f1496
nvim: Drop our yolokai theme and use default 2023-12-18 17:38:23 +05:30
Sanchayan Maity a36d7279f5
nvim: plugins: paq uses build instead of run now 2023-12-18 17:36:37 +05:30
Sanchayan Maity e18c14b0e6
nvim: lsp: Do not include declaration in reference lookups 2023-12-04 12:40:08 +05:30
Sanchayan Maity 020d9ed8a6
nvim: lsp: Inlay hints API has changed 2023-11-15 13:53:21 +05:30
Sanchayan Maity 940c66406f
nvim: Use Ruff as Python LSP
Though Ruff is not an LSP in the LSP sense but using it this way
gives us formatting and linting via code actions. All other Python
LSP servers are garbage anyway.
2023-10-26 13:06:11 +05:30
Sanchayan Maity fc80b95131
nvim: lsp-utils: Configuration updates in line with lspconfig 2023-10-14 10:34:11 +05:30
Sanchayan Maity bac3f8b577
nvim: Drop Python LSP
All Python LSP servers are garbage. Jedi was being horribly slow.
We only care about Python for GStreamer/GObject work where Python
GObject's missing type annotations prevent us from using something
like Pyright or similar. Just drop all this crap. Fuck Python!.
2023-09-15 11:46:05 +05:30
Sanchayan Maity 064df213f2
nvim: treesitter: Add back bash, markdown & python
We had dropped these in commit f349a32 since these are now included
upstream but it seems when using neovim build from source, upstream
bundled parsers do not get updated at the same cadence as treesitter
plugin. This results in breaking syntax highlighting and we have
faced this now for python and bash. Bash is still broken.
2023-09-12 12:20:42 +05:30
Sanchayan Maity ba29cb1d56
nvim: treesitter: Drop teal 2023-08-24 15:58:00 +05:30
Sanchayan Maity 95bbaa2b97
nvim: lsp: Drop mapping for hover
K is mapped to hover by default now. So let's drop our own mapping
and just use K.
2023-07-17 12:16:23 +05:30
Sanchayan Maity 00da5c690f
nvim: colors: Minor clean up
The call to highlight_terminal was redundant since we were passing
just {}. Also remove cterm related settings. Upstream has diverged
significantly, so we need not care about upstream any more.
2023-07-11 16:08:31 +05:30
Sanchayan Maity 549bc29b6f
nvim: lsp: Update capabilities check
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`.
2023-07-11 16:08:31 +05:30
Sanchayan Maity 5b108ac9b4
nvim: plugins: Minor clean up
Also run TSUpdate if treesitter gets updated.
2023-07-11 16:08:31 +05:30
Sanchayan Maity 8db1867f30
nvim: plugins: Drop nvim-lightbulb
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.
2023-07-06 18:26:07 +05:30
Sanchayan Maity b24c03af09
nvim: plugins: Drop dirbuf and use mini.files module 2023-07-06 16:57:38 +05:30
Sanchayan Maity f349a32582
nvim: treesitter: Bash, markdown & python are included upstream 2023-07-03 17:23:25 +05:30
Sanchayan Maity d159850db2
nvim: lsp: inlay_hint() has been moved to vim.lsp 2023-07-01 09:14:26 +05:30
Sanchayan Maity 0265000a4f
nvim: lsp/statusline: Add support for LSP progress
Use the same timer loop for updating LSP progress in status line
which we use for updating git ahead, behind status.
2023-06-24 15:30:22 +05:30
Sanchayan Maity 9d8130d160
nvim: lsp: Minor clean up
Define functions in a consistent way through out. We like the pattern
`local function_name = function()` instead of `local function_name()`
for defining functions.
2023-06-22 12:21:42 +05:30
Sanchayan Maity 31c9213c0a
nvim: lsp: Add support for inlay hints
Make sure to disable inlay hints by default. It seems to be quite
bug ridden at the moment. However, we add a key mapping to toggle
inlay hints.
2023-06-22 12:19:30 +05:30
Sanchayan Maity 8f05d13b11
nvim: plugins: Drop inlayhints
Drop lsp-inlayhints now that upstream merged support for inlay hints.

https://github.com/neovim/neovim/pull/23984
https://github.com/neovim/neovim/pull/24071
2023-06-20 16:58:13 +05:30
Sanchayan Maity d3775127f8
nvim: treesitter: Register haskell parser in ftplugin
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.
2023-06-20 16:58:13 +05:30
Sanchayan Maity 99531be4ad
Revert "nvim: keymappings: Drop all key mappings for tags"
This reverts commit 3657612dbb.

We want to use fast-tags with Haskell.
2023-06-20 16:58:12 +05:30
Sanchayan Maity 89dd0df8a1
nvim: plugins: Drop vim-husk
There has not been any update to the plugin in 8 years. Just drop
it from the plugin list and incorporate it directly in our config.
2023-06-19 13:09:15 +05:30
Sanchayan Maity 4468c8b0c1
nvim: treesitter: Make PureScript use Haskell parser and queries
Turns out that the Haskell treesitter implementation can be used
for PureScript as well.

This is exactly what Helix does.
https://github.com/helix-editor/helix/pull/4242/files
2023-06-07 13:47:44 +05:30
Sanchayan Maity d5a70895a5
nvim: plugins: Drop purescript-vim for PureScript syntax highlighting
This reverts 587d76d.
2023-06-07 13:46:40 +05:30
Sanchayan Maity f1f9058f06
nvim: plugins: nvim-pqf moved to GitHub 2023-06-07 12:43:32 +05:30
Sanchayan Maity 29c657b395
nvim: Use modules from mini.nvim
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.
2023-06-07 12:42:40 +05:30
Sanchayan Maity 6cb83ef74d
nvim: treesitter: Disable additional vim regex highlighting
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.
2023-06-02 13:44:11 +05:30
Sanchayan Maity 49f88776ea
nvim: treesitter: Enable diff 2023-06-02 13:10:28 +05:30
Sanchayan Maity 5674bbdc06
nvim: lsp: Add support for reloading Cargo workspace
While at it, refactor the custom setup and clean up for clients in
a single function.
2023-05-25 13:41:58 +05:30
Sanchayan Maity 269382b363
nvim: lsp-utils: Set capabilities
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)"
```
2023-05-25 13:41:58 +05:30
Sanchayan Maity 3987cb202b
nvim: lsp: Update completion kind symbols
This broke due to an update with the nerd-fonts package.

See related
https://www.reddit.com/r/archlinux/comments/1358gvh/switch_from_ttfnerdfontssymbols2048emmono_broke/
https://github.com/ryanoasis/nerd-fonts/issues/1190

Stole one or two icons from
https://github.com/onsails/lspkind.nvim/pull/64

and the rest fixed by nerdfix.
https://github.com/loichyan/nerdfix
2023-05-03 11:19:57 +05:30
Sanchayan Maity 7271c9b030
nvim: plugins: Remove auto-session
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.
2023-05-01 11:30:28 +05:30
Sanchayan Maity 5bba0b1789
Revert "nvim: after/ftplugin/cabal: Enable HLS on cabal files"
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.
2023-04-25 16:28:02 +05:30
Sanchayan Maity 39900dd9a7
nvim: after/ftplugin/purescript: Add PureScript LSP support 2023-04-22 13:05:51 +05:30
Sanchayan Maity 27e6af32b9
nvim: plugins: Add syntax highlighting for PureScript 2023-04-21 18:47:15 +05:30
Sanchayan Maity fe7ca593ae
nvim: lsp: Enable semantic token highlighting
This effectively reverts commit 0c9e0eb.
2023-04-12 11:14:42 +05:30
Sanchayan Maity 30a7f0606d
nvim: plugins: Add portal for jump & change list support 2023-03-15 10:49:06 +05:30
Sanchayan Maity c800b66cbf
nvim: plugins: Switch to nvim-various-textobjs
We never really used the comment text object and functionality of the
other two are provided in nvim-various-textobjs.
2023-03-15 10:49:06 +05:30