Commit Graph

20 Commits

Author SHA1 Message Date
b0aabf719a
nvim: Add lsp references preview window
Add 'glances.nvim' plugin which shows the LSP references, definitions and
implementations in a very nice floating preview window. (Previously we
used Telescope which is still called if the glances plugin does not
exist.)

Can preview, scroll in the floating window, go to the destination, open
the destination in vert/horiz splits.
2024-03-01 10:36:16 +01:00
8e3ef257d3
nvim: Create global option to disable linting
Setting `vim.g.disable_autoformat` to true will disable automatic linting globally,
though I have not set up commands or mappings for manual linting. It is also
missing buffer-local linting which could be copied from buffer-local formatting.
2023-12-30 21:33:16 +01:00
c977bfea06
nvim: Simplify linter loading function 2023-12-30 21:33:15 +01:00
49f6a0ef58
nvim: Refactor plugin mappings to loading code 2023-12-12 23:24:16 +01:00
0bdd406f56
nvim: Replace popup notifications with fidget
Since I am already using fidget.nvim for lsp notifications, might as well use it
for other, more explicit ones. Removed nvim-notify in favor of this since I like
how unobtrusive the notifications are (and let's be honest, most you don't need
to pay attention to, instead they just take you out of flow).
2023-12-12 14:40:58 +01:00
ea224ebbc1
nvim: Lazy load zen-mode, nvim-cmp
Correctly lazy load nvim-cmp as much as possible.
Loading it with certain events but also before lsp.
See here: https://github.com/hrsh7th/nvim-cmp/discussions/688#discussioncomment-1891544
2023-12-12 12:10:34 +01:00
eec90ad7e2
nvim: Add automatic mason tool installation
Using mason-tool-installer we ensure everything is installed correctly.
Need to improve the collection of things to install. Currently we just
do everything in lsp configuration file, even the non-lsp things
(formatters/linters) which should be sourced where they belong not
in that file.
2023-12-12 12:10:33 +01:00
ab06ef922b
nvim: Replace null-ls with nvim-lint
Fully replaced null-ls. Will need more tweaking on the nvim-lint setup but
works generally for now. Works well in tandem with conform formatter.
2023-12-12 12:10:32 +01:00
5ccf8bc1fc
nvim: Add formatting expression and more filetypes 2023-12-12 12:10:28 +01:00
bad6200bd2
nvim: Move Mason quick mapping to plugin setup 2023-12-12 12:10:27 +01:00
49692601da
nvim: Change Lsp info mapping to vim layer
Moved the mapping to show lsp info window from `<localleader>li` to
`<leader>vs`.
Local leader +l mappings should be reserved for lsp functionality,
while we have a whole +v layer to grab (meta) information about our
vim installation. It fits in there much better.
2023-12-12 12:10:26 +01:00
293dc8a467
nvim: Add conform.nvim formatter
In the process of moving away from null-ls, added formatting with the help
of conform.nvim. Brings one new command, :ConformInfo which can also be
reached via `<leader>vc`.

AutoFormat on saving remains disabled by default but can be enabled with
:FormatEnable (and disabled again with :FormatDisable) or quickly through
`<localleader>lL`.

Manual formatting works like before with `<localleader>ll`. Uses the
formatters set in the plugin (similar setup to null-ls before) but
automatically falls back to lsp formatters if it does not have its own
and lsp has one enabled.
2023-12-12 12:10:25 +01:00
8d9b67cb04
nvim: Add Trouble.nvim plugin to quickly show diag 2023-12-12 12:09:29 +01:00
8b603b8c66
nvim: Improve lazy-loading of select plugins
Aerial (on command), test-runners (on python only) and other plugins
are now only loaded when actually required.
2023-10-02 19:18:29 +02:00
23793795d6
nvim: Add coverage support for python testing
Use `,tp` to load a coverage report and show it in the gutter.
Use `,tP` to toggle it off and on. Use `,ts` to show a summary
instead.
2023-09-25 19:41:27 +02:00
8a5381a4aa
nvim: Add test setup for python to ide
Added neotest with some mappings to run tests and view
outputs, as well as neotest-python for now to make it
work under python.

Added registering with which-key if it exists.
2023-09-23 08:37:29 +02:00
60ae2e43c3
nvim: Switch signature help to cmp plugin
Simply switched signature help. Need to extensively test, but to
be perfectly honest the previous sig help plugin did not work all
the time either.
2023-09-16 11:20:59 +02:00
4410a3fa49
nvim: Switch to aerial.nvim for outlines
Move from simrats symbols outline which worked very well but had
specific issues for displaying markdown outlines as soon as any
lsp would attach itself to the same buffer.

Aerial seems to not suffer from those issues so this is the one
we will go with for now.
2023-07-25 12:04:45 +02:00
06e0cca640
nvim: Change lspconfig to track master
If tracking stable (versioned) releases, it can get out of sync
with LSPs and display errors on startup - since the stable
version gets updated very rarely (over half a year ago currently)
but LSPs and their configs change more rapidly. Since the master
branch seems stable enough we will simply track this instead
for now.
2023-06-22 12:38:22 +02:00
f33b4c9c37
nvim: Restructure lua dir
Moved plugins into individual component module files which are
automatically required by lazy.nvim. Should make everything a tiny bit
more modular, or at least prepare the way for true modularity if I ever
have the time on my hands to ensure everything works with missing
modules.

Moved core settings into their own directory (`core`), and created a
`personal` folder which contains functions/plugins I wrote that do not
necessarily have to be their own imported plugin yet.

Finally, extended the utility functions a little, so we can detect if a
plugin exists and change e.g. key maps based on that (once again,
extending modularity a little more). Some simple attempts have been made
at that in the `mappings.lua` file, though it is nowhere near extensive
yet - most keymaps are still set regardless of plugin availability.

However, with this slimmer base to work off of, I feel more confident in
changing future things about this setup a little more ad-hoc without
having as many ripple repercussions as before.
2023-06-17 21:54:22 +02:00