Commit graph

1551 commits

Author SHA1 Message Date
Marty Oehme 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
Marty Oehme 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
Marty Oehme 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
Marty Oehme 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
Marty Oehme 7ff62840b7
nvim: Move core.autocmds to core.commands 2024-06-27 16:57:24 +02:00
Marty Oehme fa48961f4a
qutebrowser: Rename docker hub search engine
Renamed from `docker` to `hub` since I otherwise always accidentally
search the actual docker hub when I want to find solutions for docker
issues.

Also sorted search engines alphabetically.
2024-06-25 11:35:23 +02:00
Marty Oehme fc5f267031
nvim: Update spellfile 2024-06-23 22:48:28 +02:00
Marty Oehme 56e14fdc2a
nvim: Enable ltex lsp for prose files 2024-06-23 10:07:46 +02:00
Marty Oehme 707cd30e67
nvim: Enable inlay hints for lua lsp 2024-06-23 10:07:23 +02:00
Marty Oehme 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
Marty Oehme 51145e740a
nvim: Ensure TS is always set up for image.nvim 2024-06-20 17:43:11 +02:00
Marty Oehme 87ce74de40
nvim: Show selection in lualine
Shows number of lines and characters selected in visual mode.
2024-06-17 15:39:53 +02:00
Marty Oehme 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
Marty Oehme 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
Marty Oehme 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
Marty Oehme 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
Marty Oehme 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
Marty Oehme 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
Marty Oehme 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
Marty Oehme 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
Marty Oehme 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
Marty Oehme c4f2522f2b
wezterm: Ensure CTRL and SHIFT mods passed through
These bindings ensure that wezterm understands (and informs the shell)
that `<C-Return>` and `<S-Return>` are different key binds than just
`<Return>` on its own.

For example 'euporie' uses it to mimic the python notebook 'enter means
newline but ctrl-enter means execute' style of quick coding.
2024-06-17 08:30:06 +02:00
Marty Oehme d8823d4661
wezterm: Switch navigator and tab hiding maps around
Since I (almost) never use the navigator, it has been put behind
`<leader>T`. The tab-hiding I used a (little) more often so that now
lies behind `<leader>t`. Simple change.
2024-06-17 08:27:35 +02:00
Marty Oehme 1a2e83ccb6
nvim: Fix overlapping REPL key maps 2024-06-16 22:30:49 +02:00
Marty Oehme fae2d85cca
nvim: Fix crash on no python venv available 2024-06-16 22:30:11 +02:00
Marty Oehme fa1db974f0
nvim: Update plugins 2024-06-16 21:38:05 +02:00
Marty Oehme ebee0042d8
nvim: Fix correct workspace propagation for python env 2024-06-16 21:36:58 +02:00
Marty Oehme b2c64a0925
nvim: Allow pasting images into markup files
With the new `img-clip.nvim` extension we can copy any image anywhere
and simply paste it into a markdown/quarto/latex/typst/... document with
the right markup already.

Those can be from the web/locally. Also allows drag and drop from e.g.
web pages.

Mapped to `<leader>pp` currently, though we will have to find a better
mapping. Or invoked with `:ImagePaste`.
2024-06-16 21:36:57 +02:00
Marty Oehme 3b1a874883
nvim: Open ipynb files as quarto files
We can now open any ipynb file as if it were a quarto document by
leveraging the `jupytext.nvim` extension which works in the background
to convert everything. Will only work if `jupytext` program is actually
installed on the machine.

Allows normal editing of the file and will write any changes back to the
original notebook on save and exit!
2024-06-16 21:36:57 +02:00
Marty Oehme 4d8cc4d2af
nvim: Add FeMaco codecell edit mapping
Added mapping to quickly edit any code cell in FeMaco, an extra buffer
which brings lsp functionality and similar with it. Can be used as a
fallback if otter.nvim is not working for the buffer, or when working on
a buffer which otter.nvim does not understand.
2024-06-16 21:36:56 +02:00
Marty Oehme 0ec49583bd
nvim: Set up image.nvim image display
Finally got image.nvim fully working on wezterm with the kitty backend
and auto-installed rock dependencies.
2024-06-16 21:36:55 +02:00
Marty Oehme e25aedd94b
nvim: Set up molten for interactive python repl
Set it up with extended options and keymaps. Will use an image provider
if it has been set externally (usually set by the 'image.nvim' setup
routine) or fall back to use the `wezterm.nvim` plugin to display it in
a wezterm pane. This display can be a little buggy so we should prefer
others.
2024-06-16 21:36:54 +02:00
Marty Oehme 63dc6fb888
nvim: Set up quarto for interactive python work 2024-06-16 21:36:53 +02:00
Marty Oehme 849489afd6
nvim: Move mini.bracketed comment to k suffix
Moved the mini bracketed comment following to use the ]k [k suffix. I am
not sure if this is completely taking since every now and again it seems
to still be overriding my own configured mapping.
2024-06-16 17:42:48 +02:00
Marty Oehme 9dcd2f3d48
nvim: Add direct python env set utility function
Added a simple 'set python environment' function to directly set the
correct python binary and update the PATH for python.
2024-06-16 17:41:18 +02:00
Marty Oehme 0bac43eb91
nvim: Split python venv fetching into multiple
Now we can either fetch the python venv basefolder
(`require('core.util').get_python_venv_basefolder()`) or specifically
the python binary contained within (`.get_python_bin()`).

Additionally, the venv result should be cached for the duration of using
nvim so that we only have to fetch it once, regardless of how many
modules require it.
2024-06-16 17:37:54 +02:00
Marty Oehme 4f5445cc0e
nvim: Add function to cleanly unmap keys
Removes them from being active in vim as well as removing them from
being displayed in which-key.

Unfortunately the which-key implementation still seems broken, sometimes
removing them sometimes leaving them as-is.
2024-06-16 16:40:10 +02:00
Marty Oehme 3e13941eae
nvim: Add mappings for inspecting treesitter
Simply invokes the `:Inspect` and `:InspectTree` commands, to have
quicker access, especially while tinkering with TS for the foreseeable
future.
2024-06-15 19:26:42 +02:00
Marty Oehme a746e35d26
nvim: Fix vn note index opening sh alias
Since we do not make use of my own zettelkasten plugin anymore, this
commit is a quick fix to reinstate the functionality of the `vn` alias
in the shell opening the note index.
An issue is that there is now no dedicated function to show or open the
index, so we have to make do with a hardcoded path. Perhaps at some
point I will get around to fixing that issue but until then I am fine
with it just working again.
2024-06-14 22:48:53 +02:00
Marty Oehme f05e2e11e1
nvim: Fix zk note creation mappings
Mappings to create a note with its content or title from the current
selection now work correctly.
2024-06-14 22:08:55 +02:00
Marty Oehme dc465bb39a
nvim: Add mapping to show notification history
Added the `<leader>sh` (show history) mapping to display the recent
history of messages sent to notify. Uses fidget.nvim to accomplish this.
2024-06-14 22:08:12 +02:00
Marty Oehme 7761018507
task: Change taskrc includes to absolute paths
In preparation for integrating bugwarrior into these dotfiles I am
changing the taskwarrior include options to absolute paths (though still
retaining the `~` home shortcut).

This seems necessary as bugwarrior, both in its current 1.8.0 and its
git HEAD version, just absolutely refuses to run when the includes are
relative to the taskrc file. A little sad but not too bad overall since
the taskrc in these dotfiles will always live in the XDG_CONFIG_HOME
directory anyway.
2024-06-14 22:07:17 +02:00
Marty Oehme 8f679d0b1a
nvim: Disable flash.nvim in search mode
Hopefully definitively disabled the search mode for the flash.nvim
plugin. Previously only disabled the key mapping but it would still run
every now and again.
2024-06-14 22:02:47 +02:00
Marty Oehme 670057d543
river: Fix variable quoting 2024-06-14 22:01:56 +02:00
Marty Oehme 38c85d6de0
papis: Small variable fix to papis-reload script 2024-06-14 21:54:48 +02:00
Marty Oehme a7b4e16f66
task: Add bugwarrior gitbug uda settings
Added settings for bugwarrior to import gitbug repository issues as
tasks into taskwarrior. This is still very experimental and I have to
continue hacking on it to arrive somewhere that is useful for me.
2024-06-13 16:57:34 +02:00
Marty Oehme 107a07693e
flavours: Fix zathura colorscheme file naming
In preparation for at some point leaving flavours in favour of tinty
(since flavours is not maintained anymore), started preparing a rough
translation of the config file for the new program. One of the things I
changed (to make more semantic sense) is the zathura colorscheme file
name.
2024-06-13 16:57:34 +02:00
Marty Oehme d2499664cd
khard: Update to new vcard dir layout
After cleaning my personal contacts, I changed the layout of my vdir
synchronization. This updates it to the new format.
2024-06-13 16:34:50 +02:00
Marty Oehme a665648b1e
nvim: Update plugins and lazy loading events 2024-06-13 16:33:33 +02:00
Marty Oehme d1ef6584f1
river: Refactor layout engine definition
Since we can dynamically define and spawn layout engines this commit
changes the riverwm config file setup in a way that makes it possible to
change the layout engine with a single variable instead of all
throughout the file (variable extraction).
2024-06-13 16:32:15 +02:00