On machines that have deno installed, we use peek instead of
markdown-preview for html-based previews of md files. The preview is
more responsive and in a neater package, as well as just not relying on
any vim plugin stuff to the same degree.
We still fall back to the old markdown-preview if no deno executable is
available.
We also change the key maps slightly to prepare for future 'prose' or
'preview' based mappings: All mappings are registered under the
`<leader>p` layer, with md preview being `<leader>pp` and various
mindmap operations moved to `<leader>pm`.
This fixes the somewhat confusing issue of trying to use any of the
surround operations before entering insert mode at least once in a file
(so, probably as the first operation). Before, the plugin would just
silently fail.
Now it simply loads very lazily, which does not affect load times
strongly.
Switched pyright to basedpyright as it adds a couple noteworthy
rules and some functions that are otherwise exlusive to pylance.
Especially useful for me are semantic highlighting as well as
inlay hints (now that nvim supports it from 0.10 onwards).
LSP attachment would complain if it did not find an existing dict to
access in the `settings.python` section of the python lsp dictionaries.
This fixes that by creating an empty dict if nothing exists yet,
essentially functioning as null-check.
Since it in fact works wonderfully now, we re-enable FeMaco, allowing to
edit codeblocks in markdown-like environments (but really anywhere) by
simply invoking `<localleader>ce` ('codeblock-edit').
The mapping is only active in markdown and quarto files for the time
being, though more can probably be added.
The command itself works anywhere (`:FeMaco`), so can be used in racket
or norg or whereever.
flash.nvim was activating on searches which, while perhaps useful
for some people, was not for me. It stops the (incremental) search
as soon as no valid target exists which drops you back into normal
mode while still typing out the search and thus doing
who-knows-what.
The operator pending mode for the original jump mapping has been
removed to allow the 'surround' mappings from mini plugin to
always work correctly (`ysiw`, `csaw`, ...).
Since treesitter is deprecating modules we switch to the new fork of the
plugin which works without any use of treesitter modules.
A painless switch since I only use the default settings of the plugin
anyway.
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.
If the cursor was on the very first letter of a word it would fix
the misspelled word instead - now it should stay and fix the
current word under cursor instead.
Flash.nvim provides a very tasty remote editing functionality which lightspeed
does not. Otherwise it behaves *mostly* the same. For now, I have the flash
search label functionality activated (default) but if it is annoying I will
turn it off (It injects labels into the normal neovim search. So if you search
a word and want to go directly there, you just press the label key as part
of the search and it jumps there. This might be problematic if I quickly type
something that does not exist but it picks up a non-existent letter as label
instead.)
Otherwise, the remote editing functionality is activated by
<operator>r<label><movement>, such as `yr<label>iw` to yank inside a word
somewhere else and stay at the current position. Similarly for example
`cr<label>$` to change from the label to the end of the line and then jump
back to the original position and so on.
Slightly adapt lualine to not have arrow section/component dividers,
but simple slanted lines. Gets rid of a tiny bit of noise while still
clearly subdividing the sections for me which I need.
Also, removed displaying the hostname. I know which host I am on
generally, and rarely make use of it so it's just unnecessary info
for me.
Since I would like to keep my plugin configurations as modular as possible
I think it is a good first step to move the mini configuration directly
into the core plugin file where mini is loaded. Since this is the plugin
spec I want to take to basically any nvim installation I have, having it
in a single file makes it much easier to be portable.
Toggleterm, as nice as it is, is not one of my core dependencies.
I do not 'need' toggleterm on every nvim installation I have. Instead,
it can go into ui-related plugins since that is what it does, extend
nvim's UI functionality with new terminal dropdowns/floats.
Removed vim-exchange which, while an amazing functionality, is also
exactly replicated in mini.nvim (along with even more operators).
Uses slightly different mapping - not `cx<movement>` anymore but
`gx<movement>`. But this actually makes sense and fits in well with
my other g-prefixed operators (`gc` for comment and `ga` for align).
It is also the prefix for the other additional operators supplied
by mini.operators: `gs` for sorting text, `gm` for multiplying,
`gr` for replacing, `g=` for evaluating.
Since we already have the mini library installed in our setup, we don't
need to make use of external base16 plugins. It provides the same exact
functionality, and seems slim and bug-free. Nothing changes for the
user, but we have 1 plugin less to take care of (and it was
mis-behaving in new versions anyway).
Also set lualine to be reloaded on theme switch so it takes on the
colorscheme as well.
Added mapping to insert a link to an existing Zettel with
`<localleader>ni` (note insert), either from normal mode which creates
the complete link, or from visual selection mode which surrounds the
current selection (as visible link text) with the link.
New zettel links still use my own implementation so I have full control
over their naming scheme.
When switching the current buffer to the Zettelkasten index page
(`<leader>ni`), we now also switch the working directory to the
corresponding notes directory.
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.
Moved loading and setting up file watching to the loading of the plugin itself.
Will make it a little more self-contained and not crash or complain if we are
missing the plugin.
HACK
At the same time, reverted back to pinned base16 commit since the new one did
not work again. Gotta figure it out at some point but no time now.
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).