Commit graph

397 commits

Author SHA1 Message Date
15afe9a85a
nvim: Switch to lazydev lua lsp setup
Much easier lua development setup.
2024-08-12 20:03:54 +02:00
4be3a42ffa
nvim: Simplify formatter loading
Since we use Mason to automatically install any formatter we need, there
is (currently) no need for the more complicated logic of deciding
between multiple formatters (since the one we prefer should always be
available). This also fixes an issue that we can set 'prettier' specific
options in conform.nvim but those do not apply to 'prettierd' the same
way - we now just use prettier and ignore prettierd.
2024-08-12 19:45:11 +02:00
be842ce622
nvim: Simplify molten statusline function
Instead of doing all kinds of security checks beforehand, we simply wrap
the molten kernel check into a lua protected call and return an empty
result if we would error. We only return the symbol if we don't error
and we have an active kernel.
2024-08-12 19:45:10 +02:00
41d2b5b628
nvim: Rename ide to testing plugins 2024-08-07 21:17:32 +02:00
6a7385ed26
nvim: Split formatting off ide plugins 2024-08-07 21:17:18 +02:00
1e44ef4c11
nvim: Remove harper lsp
For the time being remove harper (code spellcheck) lsp from the
automatically loaded LSPs. It's not *bad* per se but also requires way
more setup for me to be useful and throws up false positives all over
the place. Worst of all though it does not seem to actually stop
producing diagnostics when it is stopped (with `LspStop <harper-id>`)
like all the other LSPs do, so there is no way to get rid of its
results.
2024-08-07 21:17:17 +02:00
4f2acad60d
nvim: Add todo comment highlighting plugin
Added todo-comments.nvim plugin by folke, which will automatically
highlight (in a sane color) all the `TODO:`, `FIXME:`, `WARN:`, and more
comments within code.
2024-08-07 21:17:17 +02:00
490aadc433
nvim: Add spelling and abbreviations 2024-08-07 20:05:42 +02:00
2ddf69c244
nvim: Refactor lsp, linting and outliners away from ide
Start splitting up ide plugin module by splitting out individual
modules.
2024-07-30 14:37:20 +02:00
95de192924
nvim: Update plugins 2024-07-30 07:55:07 +02:00
7b9abab298
nvim: Improve quarto syntax rendering
Removed the standalone vim-pandoc-syntax plugin since I have not really
been using its functionality for a long time. Additionally, set reduce
conceallevel in markdown and quarto files to 2 for the time being to
prevent some rendering errors (especially on headlines) when interacting
with the markdown.nvim (render-markdown) plugin.
2024-07-30 07:54:38 +02:00
7af5fca62a
nvim: Exchange headlines plugin for markdown.nvim
To render markdown highlights and a few other things (list items, code
blocks, callouts, etc) we switched from headlines.nvim to markdown.nvim
(internally ralled render-markdown).
This now also enables quick switching between showing the rendered
output and raw markdown (`<leader>pp`).
2024-07-26 15:33:43 +02:00
7a051952fc
nvim: Update which-key mapping functions
Use new which-key mapping `.add()` functions after `.register()` has
been deprecated with which-key 3.0.0.
2024-07-24 14:53:48 +02:00
d45d220b52
nvim: Update plugins 2024-07-24 14:13:14 +02:00
1b4f73ae9b
nvim: Do not establish quarto molten session on open
We now disable the automatic establishing of quarto molten sessions
(using the virtual environment provided python interpreter) as soon as
the file is opened since it can have some negative side-effects and also
slows down quarto file opening.
Instead, use the `JupyterStart` command to establish a jupyter session
in the correct environment and initialize a molten session.

The behaviour can be re-enabled with
`vim.g.quarto_auto_init_molten_session = true`.
2024-07-24 14:13:01 +02:00
a94b1ccbb2
nvim: Add vs shell alias to start vim stratchpad 2024-07-24 14:09:47 +02:00
0b5c7d09d5
nvim: Remove quarto fn snippet
Removed `fn` snippet from quarto snippets since we already have the
functionally equivalent `]]` snippet for markdown (which quarto
extends).
2024-07-20 16:50:42 +02:00
88f187160a
nvim: FormatDisable disables globally with a bang
Switch the functionality of `FormatDisable` command around: Disables for
the local buffer by default and disables globally if called with a bang.
2024-07-20 16:50:00 +02:00
d2a2537df0
nvim: Enable json lsp 2024-07-20 16:48:54 +02:00
f5592b5e85
vifm: JupyterStart always uses sessionfile
Make JupyterStart always use the buffer sessionfile (or create the
default one if none exists) instead of only on first run.
2024-07-20 16:48:34 +02:00
19c95400f7
nvim: Add scratchpad item to start screen
Added an item to quickly create a scratchpad to the mini.starter
template.

The difference to opening a default empty buffer is that it is seen as
ephemeral (i.e. will not complain if you close vim without saving) and
it sets the default filetype to markdown.

Closes 753ed1f.
2024-07-20 14:01:31 +02:00
db86edf4ce
nvim: Fix lsp key mapping for markdown files
We forgot to pass through the original on_attach function when loading
the custom marksman one, now fixed.
2024-07-03 09:46:13 +02:00
011942e049
nvim: Update plugins 2024-07-02 13:08:19 +02:00
1514eca622
nvim: Update to new conform.nvim version
Update and fix small breaking change in new conform by specifically
setting lsp formatting as fallback. Move to explicit ruff format import
organizing and remove tailwind css lsp for the time being.
2024-07-02 13:08:07 +02:00
8aa845dcfb
nvim: Update otter and quarto
Fix small cmp completion source breaking change for new otter and quarto
versions.
2024-07-02 12:43:38 +02:00
444c378d89
nvim: Update ZK mappings 2024-06-27 17:26:02 +02:00
851bf58b21
nvim: Improve snippet jumping
Snippets can be jumped through more easily now since jumping between
snippets (with <tab> and <s-tab>) takes precedence over completions and
jumping through completions. That means when a snippet has been expanded
we can now cycle through its insertion points without worrying about
activating completion items instead.

Additionally, only jump through insertion points as long as we are
within the snippet boundaries with the cursor, so it doesn't surprise
jump later when pressing <tab> from somewhere else in the file.
2024-06-27 17:24:29 +02:00
894b7ff175
nvim: Disable marksman lsp in zk notebook directories
When a `.zk` directory is found in the current root directory of the
marksman project, the lsp is disabled.

This is because zk delivers its own lsp server with correct following of
note ids instead of full file names which marksman expects and fails to
find.
2024-06-27 17:22:03 +02:00
e6497a2241
nvim: Only start ltex LSP if spellchecking enabled
Since ltex-lsp eats quite a lot of resources and takes a while to start
up we don't always want it enabled for every prose file. This commit
ensures that it only starts up when spellchecking is enabled for a
buffer (through the custom user command `SpellToggle`).
2024-06-27 17:20:35 +02:00
9ded34f73c
nvim: Add custom spellcheck toggle with user events
Added a user command `SpellTogle` which toggles on or off spellchecking
in the current buffer. Can be invoked like that, or with one or multiple
language to spellcheck (e.g. `SpellToggle en_us en_gb`). Can also be
invoked with a bang to always enable instead of toggling.

Publishes a user event called `SpellEnable` or `SpellDisable` depending
on the aciton which autocommands can listen for.
2024-06-27 17:18:34 +02:00
7ff62840b7
nvim: Move core.autocmds to core.commands 2024-06-27 16:57:24 +02:00
fc5f267031
nvim: Update spellfile 2024-06-23 22:48:28 +02:00
56e14fdc2a
nvim: Enable ltex lsp for prose files 2024-06-23 10:07:46 +02:00
707cd30e67
nvim: Enable inlay hints for lua lsp 2024-06-23 10:07:23 +02:00
a5f0698ab0
nvim: Make molten not lazyload
For some reason molten-nvim fails sometimes when lazy loading. This
simply turns lazy load off for the time being but I should instead
investigate a little more what is actually causing it.
2024-06-20 17:44:34 +02:00
51145e740a
nvim: Ensure TS is always set up for image.nvim 2024-06-20 17:43:11 +02:00
87ce74de40
nvim: Show selection in lualine
Shows number of lines and characters selected in visual mode.
2024-06-17 15:39:53 +02:00
0f46dcad28
nvim: Fix molten statusline icon
Fixed issue when pynvim did not exist in the environment but we tried to
invoke a molten-nvim command. Now we first fire up python to check for
pynvim existence. This takes a moment so we do it asynchronously and
cache the result for the rest of the program runtime.

Also we only show the molten icon if we are actually connected to a
running kernel.
2024-06-17 15:39:25 +02:00
2d513ad74b
nvim: Remove vale linter
It does not work right. I tried to set up the lsp instead, and that also
is giving me more trouble than I can troubleshoot right now.
2024-06-17 14:32:24 +02:00
b4a9b5179f
nvim: Automatically install linters and formatters
Switch out mason-tool-installer for mason-conform.nvim and
mason-nvim-lint as respective wrappers for automatically installing
formatters and linters.

Follows the same principle as mason-lspconfig.nvim (in fact, the repos
are mostly based on the same code) and apply the concept to the other
tools: Whatever is enabled in the respective plugins (lspconfig,
nvim-lint and conform.nvim) will automatically be installed by mason.

This is really neat and basically takes care of me ever having to
interact much with Mason itself or manually set up the tools to be
installed. All I have to make sure is that they're updated once in a
while.
2024-06-17 14:00:00 +02:00
b2dfdfd5ff
nvim: Fix ruff lsp
We now make use of the ruff-inbuilt LSP offering since it just entered
beta.
We also disable all rules in pyright LSP that ruff takes care of, and in
turn disable hover capability in ruff since it's worse than pyright
(still).
More information here:
https://github.com/astral-sh/ruff/tree/main/crates/ruff_server#setup
and here:
https://github.com/astral-sh/ruff/blob/main/crates/ruff_server/docs/setup/NEOVIM.md
2024-06-17 13:34:02 +02:00
8dbfa2dd13
nvim: Extend snippet capability
Enabled snippet completion from the first letter (allowing single letter
snippet prefixes).
Extended the luasnip usage and added a telescope extension to show all
enabled snippets for the current buffer.
2024-06-17 13:34:02 +02:00
a7aca62a15
nvim: Extend lualine enabled extensions
Added more extensions for plugins that I use, all pre-defined.
2024-06-17 13:34:01 +02:00
c45d85922b
nvim: Fix wrong lazy.nvim plugin spec options
Some options were left over from old plugin managers, some were just
used wrong.
2024-06-17 13:34:00 +02:00
157fbc812c
nvim: Extraction completion setup into own module
As a first step to disentangle the ide.lua module into completion,
formatting, lsp (and maybe lint?), this separates the completion module
into its own file.
2024-06-17 10:42:12 +02:00
543a149da2
nvim: Update treesitter dependencies
Moved rainbow delimiters into dependencies so that it runs with TS
instead of loading TS on its own. Made TS itself more lazy (only loading
on VeryLazy by default).

Run TSUpdate on each run instead of only each build step.
2024-06-17 10:31:39 +02:00
1a2e83ccb6
nvim: Fix overlapping REPL key maps 2024-06-16 22:30:49 +02:00
fae2d85cca
nvim: Fix crash on no python venv available 2024-06-16 22:30:11 +02:00
fa1db974f0
nvim: Update plugins 2024-06-16 21:38:05 +02:00
ebee0042d8
nvim: Fix correct workspace propagation for python env 2024-06-16 21:36:58 +02:00