mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-26 14:12:23 +00:00
Add some nvim stuff, clean up nvim UI
This commit is contained in:
parent
6d69481cd7
commit
4516223a1e
11 changed files with 76 additions and 24 deletions
|
@ -13,8 +13,10 @@ case "$1" in
|
||||||
;;
|
;;
|
||||||
"volume")
|
"volume")
|
||||||
pamixer --get-volume;
|
pamixer --get-volume;
|
||||||
pactl subscribe | grep --line-buffered "Event 'change' on sink " | while read -r evt;
|
pactl subscribe \
|
||||||
do pamixer --get-volume;
|
| grep --line-buffered "Event 'change' on sink " \
|
||||||
|
| while read -r evt;
|
||||||
|
do pamixer --get-volume | cut -d " " -f1;
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
"toggle")
|
"toggle")
|
||||||
|
|
|
@ -45,6 +45,8 @@
|
||||||
"s" (cmd "w" "Save file")
|
"s" (cmd "w" "Save file")
|
||||||
"g" (cmd "Neogit" "Git")
|
"g" (cmd "Neogit" "Git")
|
||||||
|
|
||||||
|
"n" [(. (require :persistence) :load) "Load last session"]
|
||||||
|
|
||||||
"m" {:name "+Code actions"
|
"m" {:name "+Code actions"
|
||||||
"d" (cmd "Lspsaga hover_doc" "Show documentation")
|
"d" (cmd "Lspsaga hover_doc" "Show documentation")
|
||||||
"b" (cmd "Lspsaga lsp_finder" "Find stuff")
|
"b" (cmd "Lspsaga lsp_finder" "Find stuff")
|
||||||
|
@ -76,7 +78,7 @@
|
||||||
"v" {:name "+view-and-layout"
|
"v" {:name "+view-and-layout"
|
||||||
"n" (cmd "set relativenumber!" "toggle relative numbers")
|
"n" (cmd "set relativenumber!" "toggle relative numbers")
|
||||||
"m" (cmd "set nonumber! norelativenumber" "toggle numbers")
|
"m" (cmd "set nonumber! norelativenumber" "toggle numbers")
|
||||||
"g" (cmd "Goyo | set linebreak" "toggle focus mode")
|
"g" (cmd "ZenMode" "toggle zen mode")
|
||||||
"i" (cmd "IndentGuidesToggle" "toggle indent guides")}
|
"i" (cmd "IndentGuidesToggle" "toggle indent guides")}
|
||||||
|
|
||||||
"b" {:name "+buffers"
|
"b" {:name "+buffers"
|
||||||
|
|
|
@ -11,15 +11,22 @@
|
||||||
:rhysd/conflict-marker.vim {}
|
:rhysd/conflict-marker.vim {}
|
||||||
:wellle/visual-split.vim {}
|
:wellle/visual-split.vim {}
|
||||||
:sindrets/diffview.nvim {}
|
:sindrets/diffview.nvim {}
|
||||||
|
:folke/persistence.nvim {:mod "dots.plugins.persistence"}
|
||||||
|
:folke/zen-mode.nvim {:cmd ["ZenMode"]
|
||||||
|
:mod "dots.plugins.zen-mode"}
|
||||||
|
:folke/twilight.nvim {:mod "dots.plugins.twilight"}
|
||||||
:TimUntersberger/neogit {:mod "dots.plugins.neogit"
|
:TimUntersberger/neogit {:mod "dots.plugins.neogit"
|
||||||
:cmd ["Neogit"]}
|
:cmd ["Neogit"]}
|
||||||
|
|
||||||
:lifepillar/vim-gruvbox8 {:opt false
|
:lifepillar/vim-gruvbox8 {:opt false
|
||||||
:config #(do (set vim.g.gruvbox_italics 0)
|
:config
|
||||||
|
#(do (set vim.g.gruvbox_italics 0)
|
||||||
(set vim.g.gruvbox_italicise_strings 0)
|
(set vim.g.gruvbox_italicise_strings 0)
|
||||||
(set vim.g.gruvbox_filetype_hi_groups 1)
|
(set vim.g.gruvbox_filetype_hi_groups 1)
|
||||||
(set vim.g.gruvbox_plugin_hi_groups 1)
|
(set vim.g.gruvbox_plugin_hi_groups 1)
|
||||||
(vim.cmd "colorscheme gruvbox8"))}
|
(vim.cmd "colorscheme gruvbox8")
|
||||||
|
(req dots.utils.highlight :SignColumn {:bg (. (require :dots.colors) :dark0)}))}
|
||||||
|
;(req dots.utils.highlight :LspDiagnosticsUnderlineError {:gui "underline"}))}
|
||||||
|
|
||||||
:nvim-telescope/telescope.nvim {:mod "dots.plugins.telescope"
|
:nvim-telescope/telescope.nvim {:mod "dots.plugins.telescope"
|
||||||
:cmd ["Telescope"]
|
:cmd ["Telescope"]
|
||||||
|
@ -75,8 +82,6 @@
|
||||||
:tweekmonster/startuptime.vim {:cmd ["StartupTime"]}
|
:tweekmonster/startuptime.vim {:cmd ["StartupTime"]}
|
||||||
:tpope/vim-repeat {}
|
:tpope/vim-repeat {}
|
||||||
|
|
||||||
:junegunn/goyo.vim {:cmd "Goyo"}
|
|
||||||
|
|
||||||
:lewis6991/gitsigns.nvim {:after ["vim-gruvbox8"]
|
:lewis6991/gitsigns.nvim {:after ["vim-gruvbox8"]
|
||||||
:mod "dots.plugins.gitsigns"}
|
:mod "dots.plugins.gitsigns"}
|
||||||
|
|
||||||
|
@ -97,7 +102,7 @@
|
||||||
:iamcco/markdown-preview.nvim {:run vim.fn.mkdp#util#install}
|
:iamcco/markdown-preview.nvim {:run vim.fn.mkdp#util#install}
|
||||||
|
|
||||||
:rcarriga/nvim-dap-ui {:opt false
|
:rcarriga/nvim-dap-ui {:opt false
|
||||||
:config #((. (require :dapui) :setup))
|
:config #(req dapui.setup)
|
||||||
:requires [:mfussenegger/nvim-dap]}
|
:requires [:mfussenegger/nvim-dap]}
|
||||||
:mfussenegger/nvim-dap {:opt false}
|
:mfussenegger/nvim-dap {:opt false}
|
||||||
;:mod "dots.plugins.nvim-dap"}
|
;:mod "dots.plugins.nvim-dap"}
|
||||||
|
@ -151,8 +156,9 @@
|
||||||
;:bhurlow/vim-parinfer {:ft ["fennel" "carp" "lisp" "elisp"]}
|
;:bhurlow/vim-parinfer {:ft ["fennel" "carp" "lisp" "elisp"]}
|
||||||
|
|
||||||
;:eraserhd/parinfer-rust {:run "cargo build --release"}
|
;:eraserhd/parinfer-rust {:run "cargo build --release"}
|
||||||
"elkowar/parinfer-rust" {:run "cargo build --release"
|
:/home/leon/coding/prs/parinfer-rust {}
|
||||||
:branch "configure-filetypes"}
|
;"elkowar/parinfer-rust" {:run "cargo build --release"
|
||||||
|
;:branch "yuck"}
|
||||||
|
|
||||||
:bduggan/vim-raku {:ft ["raku"]}
|
:bduggan/vim-raku {:ft ["raku"]}
|
||||||
:LnL7/vim-nix {:ft ["nix"]}
|
:LnL7/vim-nix {:ft ["nix"]}
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
:use_lspsaga false
|
:use_lspsaga false
|
||||||
:decorator ["`" "`"]}))
|
:decorator ["`" "`"]}))
|
||||||
|
|
||||||
|
;(req dots.utils.highlight :LspDiagnosticsUnderlineError {:gui "underline"})
|
||||||
(if client.resolved_capabilities.document_highlight
|
(if client.resolved_capabilities.document_highlight
|
||||||
(do
|
(do
|
||||||
(utils.highlight "LspReferenceRead" {:gui "underline"})
|
(utils.highlight "LspReferenceRead" {:gui "underline"})
|
||||||
|
@ -95,8 +96,8 @@
|
||||||
|
|
||||||
(let [rust-tools (require "rust-tools")]
|
(let [rust-tools (require "rust-tools")]
|
||||||
(rust-tools.setup {:tools {:inlay_hints {:show_parameter_hints false}
|
(rust-tools.setup {:tools {:inlay_hints {:show_parameter_hints false}
|
||||||
:autoSetHints false}}))
|
:autoSetHints false}
|
||||||
;:server {:cmd ["/home/leon/coding/prs/rust-analyzer/target/release/rust-analyzer"]}}))
|
:server {:on_attach on_attach}}))
|
||||||
|
|
||||||
(let [sumneko_root_path (.. vim.env.HOME "/.local/share/lua-language-server")
|
(let [sumneko_root_path (.. vim.env.HOME "/.local/share/lua-language-server")
|
||||||
sumneko_binary (.. sumneko_root_path "/bin/Linux/lua-language-server")]
|
sumneko_binary (.. sumneko_root_path "/bin/Linux/lua-language-server")]
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
(saga.init_lsp_saga
|
(saga.init_lsp_saga
|
||||||
{:border_style "single" ; single double round plus
|
{:border_style "single" ; single double round plus
|
||||||
:code_action_prompt {:enable true
|
:code_action_prompt {:enable true
|
||||||
:sign true
|
:sign false
|
||||||
:virtual_text false}
|
:virtual_text false}
|
||||||
:code_action_keys {:quit "<esc>" :exec "<CR>"}
|
:code_action_keys {:quit "<esc>" :exec "<CR>"}
|
||||||
:rename_action_keys {:quit "<esc>" :exec "<CR>"}
|
:rename_action_keys {:quit "<esc>" :exec "<CR>"}
|
||||||
|
|
5
nvim/.config/nvim/fnl/dots/plugins/persistence.fnl
Normal file
5
nvim/.config/nvim/fnl/dots/plugins/persistence.fnl
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
(module dots.plugins.persistence
|
||||||
|
{autoload {persistence persistence}})
|
||||||
|
|
||||||
|
(persistence.setup
|
||||||
|
{:dir (vim.fn.expand (. (vim.fn.stdpath "cache") "/sessions/"))})
|
|
@ -9,6 +9,7 @@
|
||||||
:auto_close true
|
:auto_close true
|
||||||
:auto_open false
|
:auto_open false
|
||||||
:auto_jump ["lsp_definitions" "lsp_workspace_diagnostics"]
|
:auto_jump ["lsp_definitions" "lsp_workspace_diagnostics"]
|
||||||
|
:indent_lines false
|
||||||
:action_keys
|
:action_keys
|
||||||
{:jump "o"
|
{:jump "o"
|
||||||
:jump_close "<CR>"
|
:jump_close "<CR>"
|
||||||
|
@ -16,11 +17,11 @@
|
||||||
:cancel "q"
|
:cancel "q"
|
||||||
:hover ["a" "K"]}})
|
:hover ["a" "K"]}})
|
||||||
|
|
||||||
(utils.highlight "LspTroubleFoldIcon" {:bg "NONE" :fg colors.bright_orange})
|
(utils.highlight "TroubleFoldIcon" {:bg "NONE" :fg colors.bright_orange})
|
||||||
(utils.highlight "LspTroubleCount" {:bg "NONE" :fg colors.bright_green})
|
(utils.highlight "TroubleCount" {:bg "NONE" :fg colors.bright_green})
|
||||||
(utils.highlight "LspTroubleText" {:bg "NONE" :fg colors.light0})
|
(utils.highlight "TroubleText" {:bg "NONE" :fg colors.light0})
|
||||||
|
|
||||||
(utils.highlight "LspTroubleSignError" {:bg "NONE" :fg colors.bright_red})
|
(utils.highlight "TroubleSignError" {:bg "NONE" :fg colors.bright_red})
|
||||||
(utils.highlight "LspTroubleSignWarning" {:bg "NONE" :fg colors.bright_yellow})
|
(utils.highlight "TroubleSignWarning" {:bg "NONE" :fg colors.bright_yellow})
|
||||||
(utils.highlight "LspTroubleSignInformation" {:bg "NONE" :fg colors.bright_aqua})
|
(utils.highlight "TroubleSignInformation" {:bg "NONE" :fg colors.bright_aqua})
|
||||||
(utils.highlight "LspTroubleSignHint" {:bg "NONE" :fg colors.bright_blue})
|
(utils.highlight "TroubleSignHint" {:bg "NONE" :fg colors.bright_blue})
|
||||||
|
|
5
nvim/.config/nvim/fnl/dots/plugins/twilight.fnl
Normal file
5
nvim/.config/nvim/fnl/dots/plugins/twilight.fnl
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
|
||||||
|
(module dots.plugins.twilight
|
||||||
|
{autoload {twilight twilight}})
|
||||||
|
|
||||||
|
(twilight.setup)
|
7
nvim/.config/nvim/fnl/dots/plugins/zen-mode.fnl
Normal file
7
nvim/.config/nvim/fnl/dots/plugins/zen-mode.fnl
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
(module dots.plugins
|
||||||
|
{autoload {zen-mode zen-mode}})
|
||||||
|
|
||||||
|
|
||||||
|
(zen-mode.setup
|
||||||
|
{:window {:options {:wrap true}}})
|
||||||
|
|
|
@ -101,10 +101,24 @@
|
||||||
(utils.highlight-add :FloatBorder {:bg colors.dark0_hard})
|
(utils.highlight-add :FloatBorder {:bg colors.dark0_hard})
|
||||||
(utils.highlight-add :SpecialComment {:fg colors.dark4})
|
(utils.highlight-add :SpecialComment {:fg colors.dark4})
|
||||||
|
|
||||||
|
(utils.highlight-add
|
||||||
|
[:LspDiagnosticsSignError :LspDiagnosticsSignWarning :LspDiagnosticsSignInformation :LspDiagnosticsSignHint]
|
||||||
|
{:bg "NONE"})
|
||||||
|
(utils.highlight :LspDiagnosticsUnderlineError {:gui "undercurl"})
|
||||||
|
|
||||||
|
|
||||||
(utils.highlight ["StatusLine" "GalaxyLineInfo" "GalaxySpace" ] {:bg colors.dark1 :fg colors.light0})
|
(utils.highlight ["StatusLine" "GalaxyLineInfo" "GalaxySpace" ] {:bg colors.dark1 :fg colors.light0})
|
||||||
|
|
||||||
(vim.cmd "highlight link Function GruvboxGreen")
|
(vim.cmd "highlight link Function GruvboxGreen")
|
||||||
|
(utils.highlight-add :Function {:gui "NONE"})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(vim.fn.sign_define :LspDiagnosticsSignError {:text "◆"})
|
||||||
|
(vim.fn.sign_define :LspDiagnosticsSignWarning {:text "◆"})
|
||||||
|
(vim.fn.sign_define :LspDiagnosticsSignHint {:text "◆"})
|
||||||
|
(vim.fn.sign_define :LspDiagnosticsSignInformation {:text "◆"})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; foldend
|
; foldend
|
||||||
|
@ -116,7 +130,7 @@
|
||||||
|
|
||||||
; rust.vim
|
; rust.vim
|
||||||
(set vim.g.rust_clip_command "xclip -selection clipboard")
|
(set vim.g.rust_clip_command "xclip -selection clipboard")
|
||||||
(set vim.g.rustfmt_autosave 1)
|
;(set vim.g.rustfmt_autosave 1)
|
||||||
|
|
||||||
(set vim.g.conjure#client#fennel#aniseed#aniseed_module_prefix "aniseed.")
|
(set vim.g.conjure#client#fennel#aniseed#aniseed_module_prefix "aniseed.")
|
||||||
(set vim.g.vim_parinfer_filetypes ["carp" "fennel" "clojure"])
|
(set vim.g.vim_parinfer_filetypes ["carp" "fennel" "clojure"])
|
||||||
|
|
|
@ -6,6 +6,15 @@
|
||||||
,...
|
,...
|
||||||
(nvim.ex.augroup :END)))
|
(nvim.ex.augroup :END)))
|
||||||
|
|
||||||
|
:req
|
||||||
|
(fn [name ...]
|
||||||
|
(let [str (require :aniseed.string)
|
||||||
|
a (require :aniseed.core)
|
||||||
|
segs (str.split (tostring name) "%.")
|
||||||
|
mod (str.join "." (a.butlast segs))
|
||||||
|
func (a.last segs)]
|
||||||
|
`((. (require (tostring ,mod)) (tostring ,func)) ,...)))
|
||||||
|
|
||||||
:autocmd
|
:autocmd
|
||||||
(fn [...]
|
(fn [...]
|
||||||
`(nvim.ex.autocmd ,...))
|
`(nvim.ex.autocmd ,...))
|
||||||
|
|
Loading…
Reference in a new issue