Finally changed the 'show line diagnostics' (opening a popup with all
diagnostics on current line) mapping to fit to the other remappings
moving 'diagnostics' to the `e` key, with `<localleader>le`.
And fixed the ability to toggle diagnostics as virtual lines with
`<localleader>lO`.
Held back a little by the issue that you can't really set aliases
conditionally (yet?) in nushell, which is kind of fundamental to my
zsh/sh alias setup. If a program exists, we add some nice aliases -- if
not, we simply degrade gracefully and don't add anything.
PR to track issue:
https://github.com/nushell/nushell/issues/5068
Update to solely use snacks zen mode, removing both twilight and
zen-mode plugins.
For now, we switch to a personal fork of `snacks.nvim` which enables
explicit enabling and disabling of the zen mode.
If it gets upstreamed we can switch back to the regular snacks plugin.
Streamlined some snacks loading and optional lazy-loading.
Since the molten-nvim plugin supports setting `snacks.nvim` as
`molten_image_provider`, we add it as optional dependency.
It is _not_ enabled yet however, have to figure out how to accomplish
this from the embedded optional spec, and also fix molten-nvim before
adding more stuff to it.
`<leader><c-s-Q>` activates the pane selector and lets you decide which
pane to detach from the current _window_ and move to a new one.
This mirrors the `<leader><c-q>` mapping moving a pane to a new tab,
only 'bigger', thus using shift in addition.
The binding is a little awkward, but with how rarely I have needed to
use it this was fine for me so far.
The suggested history completion on the reedline (i.e. fish-like
autosuggestion) can be fully completed with the `l` key in vi cmd mode.
This change adds the ability to complete the suggestion partially by
completing the current word using `e`. If no history suggestion exists
it moves to the end of the current word as usual.
This mimics the partial completion I have set up in zsh with the help of
the `zsh-autosuggestions` plugin.
Using <c-z> when a process is running backgrounds it (default behavior)
using the new nushell job control system (since v0.103).
This change also lets you re-foreground the backgrounded program with
the same <c-z> key mapping.
Additionally we add the `fg` alias which does the same and thus mimics
the fg command of other shells like zsh.
Enabled transient prompt for nushell so we only display the line
character and attempt to display command durations for past prompts.
Not sure if command duration is working correctly. If not, might have to
revert this change.
Removed the buffer editor hardcoding to 'nvim', should use the EDITOR
env var instead.
Added the (currently undocumented?) config option to enable fuzzy
completion matching - essentially enables exactly the behavior the
'fzf-tab-complete' plugin does for zsh, only natively in the nushell
program.
See: https://github.com/nushell/nushell/issues/1275#issuecomment-2964573062
`td` will display things that are either due today or in the past, or
scheduled today or in the past.
`TD` will _only_ display things that are explicitly due today or in the
past.
Explicitly enable terraform and typst version displays (if in directory
with terraform state files or .typ files for typst), and change the
symbol for the typst module to a feather (which is much nicer than the
plain 't' it would display otherwise).
Added little single-character displays at the front of the prompt if we
are in a shell different from zsh to remind myself (since they all look
exactly the same with starship).
Toggle sudo prefix for command line with <alt-s>. Not sure if I will
keep this binding in the long run but it is a good example of command
execution using nushell through a key binding.
From: https://github.com/nushell/nushell/discussions/16043
It is no longer necessary to manually install the nushell tresitter as a
lazy plugin spec, according to:
https://github.com/nushell/tree-sitter-nu/blob/main/installation/neovim.md
Instead we just enable the treesitter 'nu' language in the
`languages.lua` file as usual and it works out of the box.
With the power of dotter for dotfile management we can move the files we
want to link anywhere in our repository.
So finally we're making use of it to keep the bash config files in the
`terminal/.config/bash` directory, as well as removing the leading dot
from both the zsh configuration files.
The following is added to all three shells bash, zsh, nushell:
Pressing c-t at any time lets you insert a file/dir at the current
cursor location using fzf. Same for 'T' in vicmd mode.
Pressing alt-c at any time lets you jump to that directory using zoxide,
with the zle editor content intact. Same for 'C' in vicmd mode.
Zsh implementation from: https://github.com/ajeetdsouza/zoxide/issues/357
Bash implementation: https://github.com/ajeetdsouza/zoxide/issues/516
Nushell implementation taken from: https://github.com/junegunn/fzf/issues/4122
TODO: Nushell fzf mapping has one problem in that it does not quote the
selected file in any way. So any file with e.g. a space in it will have
to be manually fixed afterwards.
Added suport for the mdx filetype. With the mdx.nvim plugin it will be
recognized and applied to `*.mdx` files. The plugin also associates the
markdown parser with it, and adds some queries for mdx features.
Lastly, added mdx to the list of markdown-like languages in our prose
module so plugins like render-markdown also recognize the language and
work with it.
The reason render-markdown was not working for either is that it
requires the markdown treesitter active for the respective language.
With this, for the filetypes in question we simply tell the markdown
treesitter to also parse these.
This _might_ be a problem in the future if the djot treesitter (which
also exists and can be enabled by TS in nvim) diverges more or some
other unforeseen change happens. For now, it seems to work fine. Might
not support all the features in djot that diverge from md? I have not
used them extensively enough to notice.
For some reason the regular 'cat' completion does not work, perhaps
because it is regularly aliased to 'bat' on my systems. This manually
fixes it with a spec alias for carapace
(https://carapace-sh.github.io/carapace-bin/spec/run.html#alias)
Should find a better implementation over time but for now this is a
simple workaround. I do _not_ know how it interacts with systems when no
'bat' command is found.
Rename tabs with `<leader><S-R>`. This will provide a (full-screen)
prompt in which you can exit with esc (not changing anything), provide a
static name for the tab, or hit enter with nothing on the prompt to
return to the default naming behavior.
Suggestions are given at the top of the completion menu. Additionally,
since that can get really annoying really quick there have been some
changes specifically for copilot.lua:
We start with it disabled. It can be enabled with `<leader>ap` and
disabled again with `<leader>aP` for Ai>coPilot. If the plugin at some
point exposes functionality to toggle itself on/off completely I would
gladly switch to that. The current toggle command only attaches/detaches
the buffer but still runs the client in the background. This is less
desirable for me, plus it means the completions are still done
automatically in blink.
Since I have two configurations for my dual-screen desktop setup, with
one having the two screens side-by-side and the other having the left
screen vertically rotated 90 degrees, I need two different kanshi
setups.
The vertical setup is called 'dockedvert' and is the default when the
two screens are detected. The horizontal setup is only called 'docked'
and can be switched to manually. Before, it would not correctly revert
the left screen from its vertical 90 degree rotation when going from the
vertical setup to the horizontal one.
So I applied the `transform` output directive but kanshi refused to
start. That is because to revert the transform into the default
horizontal position you do not use `0` but `normal` as the value.
With this fix everything works as expected.
Rename mail utility programs (yet again), to be prefixed with `mail-`
instead of `neomutt-`. Also did not substitute with other MUA like
`aerc-` since these utilities are mostly independent of specific
implementations.
The very specific `neomutt-filer` implementation script I completely
removed since for aerc the same can be achieved with a simple
configuration option.
Since we do not use neomutt anymore. Additionally, perhaps a 'mail-'
prefixed system is better for scripts etc which run independent of a
specific MUA.
Explanation here:
https://man.sr.ht/~rjarry/aerc/configurations/mailto.md
I built a custom script 'aerc-in-terminal' since I want to expand the
$TERMINAL env var and use that instead. `.desktop` files do not allow
expanding vars (since they don't run in a user shell), so this is a
compromise.