Commit graph

323 commits

Author SHA1 Message Date
Sanchayan Maity 1ec6aee797
nvim: after/ftplugin/markdown: Set conceallevel to 2
neovim 0.10 introduces experimental support for hyperlinks using
OSC 8 sequence. By default, this is used in Markdown for links of
the form [example](https://example.com). If terminal supports the
OSC 8 escape sequence, then the text example in the neovim buffer
will contain a hyperlink that can be clicked and it will open in
web browser.

This means markdown files with conceallevel=2 look much closer to
the rendered output.
2024-05-17 11:35:28 +05:30
Sanchayan Maity 7ef1a00db0
nvim: after/ftplugin/haskell: Disable vim-matchup 2024-05-11 21:20:42 +05:30
Sanchayan Maity 6ba7646ad9
Revert "nvim: after/ftplugin/haskell: Update tags on file save"
This reverts commit 6f78a23ab3.
2024-05-11 20:31:51 +05:30
Sanchayan Maity 3f5b09dd7d
nvim: after/plugin/mini: Enable wrap around with hunk navigation 2024-04-17 18:39:08 +05:30
Sanchayan Maity 6617280944
nvim: statusline: Do not set winbar for empty filename 2024-04-12 20:26:03 +05:30
Sanchayan Maity cd50d8f956
nvim: statusline: Make winbar status be relative to current directory
We want file path being shown in winbar to be relative to the current
directory or in our case frequently the git root. For whatever reason,
only the first opened leftmost split would show the file path relative
to current git root while any files opened later would show the full
path starting from `HOME`/~ directory. So something around how '%f%m%r'
actually works or how it is being used to set winbar has been a problem.
2024-04-12 11:01:26 +05:30
Sanchayan Maity f27f6629de
nvim: after/ftplugin/c: Do not add include files to buffer list
Hide header files from /usr/include from the buffer list.
2024-04-11 16:07:55 +05:30
Sanchayan Maity a4b9b3fd97
nvim: after/plugin/mini: Drop comment
Commenting support is built-in now, see
73de98256c
2024-04-09 15:13:54 +05:30
Sanchayan Maity f3736630c0
nvim: statusline: Fix git status being nil
signs.add/change/delete can be nil for a file not yet being tracked
with git. This was broken in 703d23c.
2024-04-09 15:13:54 +05:30
Sanchayan Maity 767ae28f4f
nvim: plugins: Drop gitsigns 2024-04-08 14:49:42 +05:30
Sanchayan Maity 703d23c76e
nvim: after/plugin/mini: Switch to mini.diff from gitsigns 2024-04-08 14:49:36 +05:30
Sanchayan Maity 84f729f3c7
nvim: after/ftplugin/C: Do not run gst-indent after buffer save
This seems to interfere with git signs tracking among other things.
While at it move the remaining configuration to Lua.
2024-03-30 16:47:04 +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 795389215c
nvim: autoload/ftplugin: git: Update git rebase branch implementation
See this for reference.
https://andrewlock.net/working-with-stacked-branches-in-git-is-easier-with-update-refs/
2023-12-21 16:36:02 +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 6fa44274e1
nvim: after/plugin/gitsigns: watch_gitdir.interval is deprecated 2023-10-16 18:41:09 +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 6313ece287
nvim: after/plugin/fzf-lua: Add a mapping for bcommits in visual mode
The <cmd> is necessary, as `:` exits visual mode. Also, while at it
use vim.keymap.set instead of nvim_set_keymap.

Also see, https://github.com/ibhagwan/fzf-lua/issues/816.
2023-07-12 14:30:40 +05:30
Sanchayan Maity 6dd655ebce
nvim: after/ftplugin/diff: Do not highlight white space 2023-07-07 17:52:01 +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 ea588b0556
nvim: after/plugin/mini: Drop use of align module 2023-07-06 16:57:38 +05:30
Sanchayan Maity 81508aa84b
nvim: after/plugin/mini: Add a key mapping for removing white space 2023-07-03 17:22:20 +05:30
Sanchayan Maity 9c9dc6a6b8
nvim: after/plugin/mini: Use jump2d for f, F, t, T motions
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.
2023-06-29 19:32:05 +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 c1e4b234fb
nvim: statusline: vim.loop has been renamed to vim.uv 2023-06-22 17:16:23 +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 6f78a23ab3
nvim: after/ftplugin/haskell: Update tags on file save 2023-06-20 16:58:12 +05:30
Sanchayan Maity e9f10fa776
nvim: after/ftplugin: haskell: Set makeprg 2023-06-16 12:59:37 +05:30
Sanchayan Maity 5a1883fb2d
nvim: after/ftplugin/cabal: Set comment string 2023-06-10 13:30:04 +05:30
Sanchayan Maity e758ef0a08
nvim: after/ftplugin: Disable mini trailspace
Now we enable trailspace module from mini, disable it for file types
where we do not want trailing space to be highlighted.
2023-06-07 12:43:15 +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 8d2b94856c
nvim: after/ftplugin/scheme: Drop use of racket lang server for scheme 2023-05-31 10:29:38 +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 c844fe5874
nvim: after/plugin/nvim-lint: Enable actionlint
Run actionlint on save for GitHub Action workflow yaml files.
2023-05-18 15:37:41 +05:30
Sanchayan Maity 42601f6214
nvim: after/plugin/easyalign: Allow aligning on ' 2023-05-09 16:19:06 +05:30
Sanchayan Maity 1546762662
nvim: after/plugin/fzf-lua: Always parse globs in grep 2023-05-08 18:06:18 +05:30
Sanchayan Maity f8267b23b0
nvim: after/plugin/gitlinker: Add gitea web hosts we work with 2023-05-06 18:20:19 +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 95cb836e8d
nvim: after/ftplugin/cabal: Add cabalfmt plugin
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.
2023-04-25 16:28:02 +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 7ca6a1c1b8
nvim: after/ftplugin/rust: Remove format on save
Formatting on save tends to go completely wrong sometimes for some
reason. Just remove it.
2023-03-21 17:22:52 +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
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 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 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 26488153f0
nvim: after/ftplugin/haskell: Remove old configuration
We use cabal instead of stack these days and we dropped asyncdo more
than a year ago.
2023-02-28 00:17:45 +05:30
Sanchayan Maity 148e808cee
nvim: after/plugin/gitsigns: Update configuration
current_line_blame_formatter_opts is deprecated. Update the signs
configuration.
2023-02-25 18:00:07 +05:30