Compare commits

..

5 Commits

Author SHA1 Message Date
5c6318341b Added the plug for auto-pairs 2023-10-02 22:17:22 +02:00
0929cece74 Removed unused code and languages
Commented code removed, also removed languages like rust and
javascript that I do not use.
2023-10-02 22:12:16 +02:00
f04fd3e314 quicknotes.md expanded 2023-10-02 22:05:55 +02:00
22d29b811a Update quicknotes.md
Formatting
2023-08-08 21:29:11 +00:00
3be06b91df Add quicknotes.md
Creation of quicknotes.md to simplify remembering what I did in the past
2023-08-08 21:27:47 +00:00
2 changed files with 19 additions and 39 deletions

42
kakrc
View File

@ -1,6 +1,8 @@
# Load plug.kak # Load plug.kak
source "%val{config}/plugins/plug.kak/rc/plug.kak" source "%val{config}/plugins/plug.kak/rc/plug.kak"
plug "andreyorst/plug.kak" noload plug "andreyorst/plug.kak" noload
# plug auto-pairs
plug "alexherbo2/auto-pairs.kak"
# plug kak-lsp # plug kak-lsp
plug "kak-lsp/kak-lsp" do %{ plug "kak-lsp/kak-lsp" do %{
cargo build --release --locked cargo build --release --locked
@ -22,7 +24,7 @@ plug "kak-lsp/kak-lsp" do %{
define-command ee -docstring 'go to current error/warning from lsp' %{ lsp-find-error --include-warnings; lsp-find-error --previous --include-warnings } define-command ee -docstring 'go to current error/warning from lsp' %{ lsp-find-error --include-warnings; lsp-find-error --previous --include-warnings }
define-command lsp-restart -docstring 'restart lsp server' %{ lsp-stop; lsp-start } define-command lsp-restart -docstring 'restart lsp server' %{ lsp-stop; lsp-start }
hook global WinSetOption filetype=(c|cpp|cc|rust|javascript|typescript) %{ hook global WinSetOption filetype=(c|cpp|sh|python) %{
set-option window lsp_auto_highlight_references true set-option window lsp_auto_highlight_references true
set-option window lsp_hover_anchor false set-option window lsp_hover_anchor false
lsp-auto-hover-enable lsp-auto-hover-enable
@ -30,18 +32,6 @@ plug "kak-lsp/kak-lsp" do %{
lsp-enable-window lsp-enable-window
} }
hook global WinSetOption filetype=(rust) %{
set window lsp_server_configuration rust.clippy_preference="on"
}
hook global WinSetOption filetype=rust %{
hook window BufWritePre .* %{
evaluate-commands %sh{
test -f rustfmt.toml && printf lsp-formatting-sync
}
}
}
hook global KakEnd .* lsp-exit hook global KakEnd .* lsp-exit
} }
# Substitute c-n with tab # Substitute c-n with tab
@ -94,29 +84,3 @@ map global user p '<a-!>xclip -out -selection clipboard<ret>' \
-docstring 'Paste system clipboard after' -docstring 'Paste system clipboard after'
map global user R '|xclip -out -selection clipboard<ret>' \ map global user R '|xclip -out -selection clipboard<ret>' \
-docstring 'Replace selection from system clipboard' -docstring 'Replace selection from system clipboard'
## TESTING: copy and paste from TMUX
#if [ -n "$DISPLAY" ]; then
## printf %s "$kak_main_reg_dquote" | xsel --input --clipboard
#elif [ -n "$TMUX" ]; then
# map global user y '<a-|>tmux set-buffer --<ret>'
#fi
## Enable different options depending if we are inside TMUX or not
#try %{
# evaluate-commands %sh{ [ $tmux ] || echo "fail" }
# try %{
# hook global registermodified '"' %{ nop %sh{
# tmux set-buffer -- "$kak_main_reg_dquote"
# }}
# map global user p '!tmux show-buffer<ret>'
# map global user p '<a-!>tmux show-buffer<ret>'
# map global user r '|tmux show-buffer<ret>'
# }
#} catch %{
# try %{
# map global user y '<a-|>xclip -in -selection clipboard >&- 2>&-<ret>'
# map global user p '!xclip -out -selection clipboard<ret>'
# map global user p '<a-!>xclip -out -selection clipboard<ret>'
# map global user r '|xclip -out -selection clipboard<ret>'
# }
#}

16
quicknotes.md Normal file
View File

@ -0,0 +1,16 @@
### Commands used when setting up `kak-lsp`. Need to tidy up this and create a proper README.md
[kak-lsp Github](https://github.com/kak-lsp/kak-lsp)
[plug.kak Github](https://github.com/andreyorst/plug.kak)
`$ sudo yum install cargo`
`$ sudo yum install clangd`
`$ sudo yum install clang-tools`
`$ sudo yum install llvm`
`$ sudo yum install clang-tools-extra`
`$ git clone https://github.com/andreyorst/plug.kak.git $HOME/.config/kak/plugins/plug.kak`
`$ export PATH=$PATH:/home/doddo/.cargo/bin`
### Issues
- For some reason, kak-lsp does not seem to compile with the last version of Rust
- Fall back to download static precompiled `kak-lsp`
- Need to refactor the whole kakrc to make it more readable