Commit graph

336 commits

Author SHA1 Message Date
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
Sanchayan Maity 34a5bbdacb
nvim: after/ftplugin/cabal: Enable HLS on cabal files
Enabling HLS on cabal files allows us to format them using gq. HLS
just uses the internal cabal-fmt plugin.
https://haskell-language-server.readthedocs.io/en/latest/features.html#formatting
2023-03-06 22:15:29 +05:30
Sanchayan Maity 01e9c92051
nvim: plugins: Drop cabalfmt
We will switch to using HLS for this.
2023-03-06 22:04:39 +05:30
Sanchayan Maity eec59c530d
nvim: Switch to fzf-lua
Switch to fzf-lua now that it supports tmux style pop ups. For details,
see https://github.com/ibhagwan/fzf-lua/issues/225.
2023-03-06 16:13:36 +05:30
Sanchayan Maity c37a0db46a
nvim: lsp: Fix luacheck warning on setting non-standard global variable 2023-03-06 13:33:40 +05:30
Sanchayan Maity 0002d02e6c
nvim: lsp: Drop unnecessary if check 2023-03-05 00:13:28 +05:30
Sanchayan Maity 110a1643cb
nvim: Move LSP configuration to it's own LSP utils
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.
2023-02-28 20:56:36 +05:30
Sanchayan Maity 27d051e3dd
nvim: plugins: Add back vim-wordmotion 2023-02-28 00:05:45 +05:30
Sanchayan Maity 8a60e83ef5
nvim: plugins/treesitter: Drop playground
Initially added this thinking it might help with our own colorscheme
but we have never used this.
2023-02-28 00:05:45 +05:30
Sanchayan Maity 56f81f598e
nvim: Switch back to paq
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.
2023-02-09 20:19:59 +05:30
Sanchayan Maity 547bf78b9b
nvim: plugins: Update plugin configuration
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.
2023-02-09 15:57:47 +05:30
Sanchayan Maity dd0adf5212
nvim: plugins: Drop luasnip and use snippy
Our snippet usage is not extensive. Use snippy which is a more
minimalistic plugin.
2023-02-03 18:19:37 +05:30
Sanchayan Maity f5d12372bd
Revert "nvim: plugins: Drop sleuth now that neovim has editorconfig built-in"
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.
2023-01-26 16:55:43 +05:30
Sanchayan Maity 674409573b
git/nvim: Drop diffconflicts
See the discussion on
https://github.com/whiteinge/diffconflicts/issues/26

Also
https://www.eseth.org/2020/mergetools.html
2023-01-17 10:09:29 +05:30
Sanchayan Maity 5ac754ea99
nvim: plugins: Drop exchange and word motion 2023-01-15 17:22:15 +05:30
Sanchayan Maity 058c37882d
nvim: plugins: Drop sleuth now that neovim has editorconfig built-in 2023-01-15 17:22:14 +05:30
Sanchayan Maity 6340486b46
nvim: Use nvim-lint for linting markdown with vale
This effectively reverts 3ea83c6 and f4ee744.
2023-01-15 17:22:10 +05:30
Sanchayan Maity f4d02a793f
nvim: plugins: Drop dirvish and use dirbuf.nvim 2023-01-12 18:39:37 +05:30
Sanchayan Maity fcc992511e
nvim: plugins: Use our own fork of gitlinker
We want a fix and the author seems to be inactive, so use our own
fork with the patch applied till the upstream author becomes active
again.
2023-01-12 18:39:37 +05:30
Sanchayan Maity 0c9e0eb164
nvim: lsp: Disable semantic token highlighting
It produces somewhat bad syntax highlighting in some cases. For example,
in typescript, the variable and it's type annotation get the same colour.
2023-01-05 09:38:26 +05:30
Sanchayan Maity 8b6cf82abe
nvim: yolokai: Sync with upstream 2023-01-04 13:54:10 +05:30
Sanchayan Maity f68aed5238
nvim: lsp: Add mapping for clearing code lens 2023-01-03 20:04:27 +05:30
Sanchayan Maity 47498f93fc
nvim: plugins: Add autopairs and parinfer 2022-12-28 19:51:34 +05:30
Sanchayan Maity 79183f7402
nvim: Use mappings for copying entire buffer & drop textobj-entire 2022-12-28 19:51:34 +05:30
Sanchayan Maity 20b608ad08
nvim: treesitter: Enable fennel, racket and scheme 2022-12-28 19:51:09 +05:30
Sanchayan Maity ac65aa26cb nvim: lsp: Use local leader for running code lens
We use <Leader>l for linting. This should have been done as part of
commit b294f19.
2022-12-12 10:11:20 +05:30
Sanchayan Maity 4d970ce70c nvim: lsp: Fix error in LspDetach
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>
2022-11-29 20:26:28 +05:30
Sanchayan Maity b752f2241f nvim: plugins: Add support for cabal-fmt 2022-11-29 20:26:28 +05:30
Sanchayan Maity 397cac1050 nvim: plugins/treesitter: Use treehopper instead of textobjects
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.
2022-11-24 14:21:41 +05:30
Sanchayan Maity 6d7a9fe9b3 nvim: lsp: Use vim.notify to report error 2022-10-02 17:04:25 +05:30
Sanchayan Maity f4ee744e85 nvim: plugins: Use vale.nvim for vale support 2022-09-28 17:14:44 +05:30
Sanchayan Maity 7c8841431a nvim: init/treesitter: Enable bundled parsers
Now that neovim bundles parsers and highlight queries for Lua, Vimscript
and C by default, enable the bundled ones.

We can drop the entries from languages enabled via nvim-treesitter.

See
https://github.com/neovim/neovim/issues/14090#issuecomment-1237820552
2022-09-18 12:57:19 +05:30
Sanchayan Maity 05c27960f7 nvim: lsp: Disable logging
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.
2022-09-18 12:34:41 +05:30
Sanchayan Maity 4b18ecad6d nvim: Use ex commands as methods instead of string on vim.cmd 2022-09-17 10:56:51 +05:30
Sanchayan Maity f04308f569 nvim: plugins: Make packer not fetch/pull tags
Upstream repos overwrite tags like release and then PackerSync complains
about failing to update since existing tags would be clobbered after an
update.
2022-09-16 20:39:17 +05:30
Sanchayan Maity b398542a94 nvim: lsp: Minor clean up of autocmd callbacks 2022-09-13 18:16:08 +05:30
Sanchayan Maity 108403ca3d nvim: lsp: Drop custom range formatting function
With commit 11167ab, vim.lsp.buf.format now has a range argument
which defaults to current selection in visual mode.
2022-09-13 18:16:08 +05:30
Sanchayan Maity 7bae888f7d nvim: plugins: Drop suda
sudoedit is appropriate for our needs.
2022-09-01 09:31:52 +05:30
Sanchayan Maity 9a26ef9c10 nvim: Drop nvim-lspconfig
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.
2022-08-31 12:21:28 +05:30
Sanchayan Maity 8e8f6110e5 nvim: lsp: Fix argument ordering to on_attach for inlay hint 2022-08-29 17:35:47 +05:30
Sanchayan Maity 490fe4e853 nvim: plugins: Drop rust-tools & use lsp-inlayhints
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.nvim
https://github.com/simrat39/inlay-hints.nvim

The second one is from the rust-tools author himself but we could
not get that to work.
2022-08-19 16:59:19 +05:30
Sanchayan Maity 1cf5377ae5 nvim: lsp: Remove obsolete flag for clangd 2022-08-06 11:41:09 +05:30
Sanchayan Maity 01dfb0429c nvim: lsp: range_code_action is deprecated
See PR
https://github.com/neovim/neovim/pull/19551
2022-08-03 14:24:58 +05:30
Sanchayan Maity 19e651780e keymappings: Fix command line mode mappings
See https://github.com/neovim/neovim/issues/14090#issuecomment-1202280881.
2022-08-03 13:12:41 +05:30
Sanchayan Maity 4e60a3f53e nvim: plugins: Drop vimtex
For any future LaTeX writing needs we only intend to use
markdown/pandoc.
2022-07-27 12:21:48 +05:30
Sanchayan Maity d4edc15bd2 nvim: keymappings: Disable macro recording 2022-07-11 19:28:00 +05:30
Sanchayan Maity 6be67782e6 nvim: treesitter: Add golang 2022-06-05 15:03:49 +05:30
Sanchayan Maity 21944d6bca nvim: plugins: Update the marks repo location 2022-05-14 08:36:56 +05:30
Sanchayan Maity 285d1fb9a9 nvim: plugins: Drop vim-visual-star-search
Commit 233c41c in neovim upstream enabled search selection by * and #
in visual mode by default. We do not need this plugin anymore.
2022-05-13 09:11:02 +05:30