Except for mini.starter which we need right at the - well - start, we
can lazy load most other modules. It's a little awkward since we lazy
load them *within* the setup function with a manual autocommand but it
should work fine for the time being.
Since they are all used for file picking (among editing and creating)
I'll just have them run under pickers for now. If the name turns out to
be confusing or not descriptive anymore I can still change it at any
time.
Remove redundant conceallevel fix (not required for quarto files
anymore), add additional filetype injections and do not highlight
codeblocks as much (no sign colum entry, bg not over whole doc width).
Changed maps to increment on <C-S> (instead of the usual <C-A>) and
decrement on the typical <C-X>. This makes it work much better with
wezterm leader key (<C-A>) and as far as I can see does not directly
clash with any other binds.
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.
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.
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.
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.
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.
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`).
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`.
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.
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.
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.
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.
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`).
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.
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.
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.
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.