Hey everyone!
I’ve been meaning to update my config, and I’m having some annoyances with plugins. Mostly with plug.kak
.
Here’s the configuration I have for plug.kak
, which might be useful here:
evaluate-commands %sh{
plugins="$XDG_CONFIG_HOME/kak/plugins"
mkdir -p "$plugins"
[ ! -e "$plugins" ] && \
git clone -q https://github.com/andreyorst/plug.kak "$plugins/plug.kak"
printf "%s\n" "source '$plugins/plug.kak/rc/plug.kak'"
}
plug "andreyorst/plug.kak" noload config %{
set-option global plug_max_active_downloads 16
set-option global plug_always_ensure false
}
“command [x] is already defined”
I’m attempting to install peneira, and this is my configuration with plug.kak
:
plug "gustavo-hms/luar" %{
set-option global luar_interpreter luajit
plug "gustavo-hms/peneira" %{
require-module peneira
}
}
Not much different from what given in the README
. Here’s what I’m seeing in *debug*
after having none of peneira’s command available.
/home/my_user/.config/kak/plugins/plug.kak/..//.build/peneira/config:3:3: 'require-module': 3:1: 'require-module': 3:1: 'require-module': 2:5: 'define-command': command 'lua' already defined
I don’t understand what that means, or how I could fix this.
This is also something I see when I have kak-lsp
. This is the following configuration I have for that:
plug "ul/kak-lsp" do %{
cargo build --release --locked
cargo install --force --path . --locked
cargo clean
} config %{
set-option global lsp_cmd "kak-lsp -vvv -c $HOME/.config/kak-lsp/kak-lsp.toml -s %val{session} --log $HOME/.config/kak-lsp/kak-lsp.log"
#define-command lsp-restart %{ lsp-stop; lsp-start }
set-option global lsp_completion_trigger "execute-keys 'h<a-h><a-k>\S[^\s,=;*(){}\[\]]\z<ret>'"
set-option global lsp_diagnostic_line_error_sign "!"
set-option global lsp_diagnostic_line_warning_sign "?"
hook global WinSetOption filetype=(c|cpp|objc|nim|crystal|python|latex|javascript|typescript) %{
#lsp-start
lsp-enable-window
echo -debug "Enabling LSP for filtetype %opt{filetype}"
lsp-auto-hover-enable
lsp-auto-hover-insert-mode-disable
set-option global lsp_auto_highlight_references true
set-option global lsp_hover_anchor true
# Semantic highlighting
# TODO maybe there's more servers that support this
hook -once global WinSetOption filetype=rust %{
hook window -group semantic-tokens BufReload .* lsp-semantic-tokens
hook window -group semantic-tokens NormalIdle .* lsp-semantic-tokens
hook window -group semantic-tokens InsertIdle .* lsp-semantic-tokens
hook -once -always window WinSetOption filetype=.* %{
remove-hooks window semantic-tokens
}
}
# Other things
#hook window BufWritePre .* lsp-formatting-sync # this breaks shit
hook window BufWritePost .* lsp-diagnostics
hook -always global KakEnd .* lsp-exit
hook global WinSetOption filetype=rust %{
set-option window lsp_server_configuration rust.clippy_preference="on"
}
}
}
And I get this in *debug*
:
/home/my_user/.config/kak/plugins/plug.kak/..//kak-lsp/rc/lsp.kak:103:1: 'define-command': command 'lsp-start' already defined
What does this mean? How do I fix this?
“no such command”
I also have configuration for mru-files.kak.
plug "https://gitlab.com/kstr0k/mru-files.kak.git" domain "gitlab.com" defer mru-files %{
set-option global mru_files_history %sh{ echo "$HOME/.local/share/kak/mru.txt" }
} config %{
require-module kakhist; kakhist-init
map global goto ':' '<esc>: kakhist-buf-show<ret>' -docstring "show command history"
map global fuzzy 'r' '<esc>: mru-files<ret>' -docstring "recent files"
}
But I get 'mru-files': no such command
with the above, and have gotten it with many different configurations.
How do I fix this?