mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-25 21:52:23 +00:00
More nvim
This commit is contained in:
parent
386ee59373
commit
50c462a55f
9 changed files with 52 additions and 20 deletions
|
@ -21,6 +21,9 @@
|
||||||
(utils.keymap :n :MM "<cmd>lua require('nvim-gehzu').go_to_definition()<CR>" {})
|
(utils.keymap :n :MM "<cmd>lua require('nvim-gehzu').go_to_definition()<CR>" {})
|
||||||
(utils.keymap :n :MN "<cmd>lua require('nvim-gehzu').show_definition()<CR>" {})
|
(utils.keymap :n :MN "<cmd>lua require('nvim-gehzu').show_definition()<CR>" {})
|
||||||
|
|
||||||
|
(utils.keymap :n :zt "zt<c-y><c-y><c-y>")
|
||||||
|
(utils.keymap :n :zb "zb<c-e><c-e><c-e>")
|
||||||
|
|
||||||
|
|
||||||
; Fix keybinds in linewrapped mode
|
; Fix keybinds in linewrapped mode
|
||||||
;(utils.keymap [:n] :j "gj")
|
;(utils.keymap [:n] :j "gj")
|
||||||
|
|
|
@ -30,12 +30,13 @@
|
||||||
:config `#(require ,config-mod))))
|
:config `#(require ,config-mod))))
|
||||||
|
|
||||||
(use
|
(use
|
||||||
; sort me pls
|
; TODO sort me pls
|
||||||
|
|
||||||
;:vimwiki/vimwiki {:opt false
|
:vimwiki/vimwiki {:opt false
|
||||||
;:config #(set vim.g.vimwiki_list [{:path "~/obsidian-stuff/obsidian-vault"
|
:branch "dev"
|
||||||
;:syntax "markdown"
|
:config #(set vim.g.vimwiki_list [{:path "~/notes/veil-vimwiki/"
|
||||||
;:ext "md"}])}
|
:syntax "markdown"
|
||||||
|
:ext "md"}])}
|
||||||
|
|
||||||
; sorted from here!
|
; sorted from here!
|
||||||
:Olical/aniseed {:branch "develop"}
|
:Olical/aniseed {:branch "develop"}
|
||||||
|
@ -45,6 +46,7 @@
|
||||||
:lifepillar/vim-gruvbox8 (cfg "dots.plugins.gruvbox8")
|
:lifepillar/vim-gruvbox8 (cfg "dots.plugins.gruvbox8")
|
||||||
:kyazdani42/nvim-web-devicons {}
|
:kyazdani42/nvim-web-devicons {}
|
||||||
:folke/which-key.nvim {}
|
:folke/which-key.nvim {}
|
||||||
|
:folke/todo-comments.nvim (cfg "dots.plugins.todo-comments")
|
||||||
|
|
||||||
:Famiu/feline.nvim (cfg "dots.plugins.feline")
|
:Famiu/feline.nvim (cfg "dots.plugins.feline")
|
||||||
:akinsho/nvim-bufferline.lua (cfg "dots.plugins.bufferline")
|
:akinsho/nvim-bufferline.lua (cfg "dots.plugins.bufferline")
|
||||||
|
@ -183,6 +185,8 @@
|
||||||
:purescript-contrib/purescript-vim {:ft ["purescript"]}
|
:purescript-contrib/purescript-vim {:ft ["purescript"]}
|
||||||
:derekelkins/agda-vim {:ft ["agda"]}
|
:derekelkins/agda-vim {:ft ["agda"]}
|
||||||
:neovimhaskell/haskell-vim { :ft ["haskell"]}
|
:neovimhaskell/haskell-vim { :ft ["haskell"]}
|
||||||
|
:stewy33/mercury-vim {:opt false}
|
||||||
|
:ionide/Ionide-vim {:opt false}
|
||||||
|
|
||||||
|
|
||||||
:rust-lang/rust.vim {:ft ["rust"]
|
:rust-lang/rust.vim {:ft ["rust"]
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
((. lsp lsp-name :setup) merged-opts)))
|
((. lsp lsp-name :setup) merged-opts)))
|
||||||
|
|
||||||
(init-lsp :jsonls {:commands {:Format [ #(vim.lsp.buf.range_formatting [] [0 0] [(vim.fn.line "$") 0])]}})
|
(init-lsp :jsonls {:commands {:Format [ #(vim.lsp.buf.range_formatting [] [0 0] [(vim.fn.line "$") 0])]}})
|
||||||
(init-lsp :denols {:root_dir (better_root_pattern [".git"] ["package.json"])})
|
;(init-lsp :denols {:root_dir (better_root_pattern [".git"] ["package.json"])})
|
||||||
(init-lsp :hls {:settings {:languageServerHaskell {:formattingProvider "stylish-haskell"}}})
|
(init-lsp :hls {:settings {:languageServerHaskell {:formattingProvider "stylish-haskell"}}})
|
||||||
(init-lsp :ocamllsp)
|
(init-lsp :ocamllsp)
|
||||||
(init-lsp :vimls)
|
(init-lsp :vimls)
|
||||||
|
@ -97,10 +97,10 @@
|
||||||
:less {:validate true}
|
:less {:validate true}
|
||||||
:scss {:validate true}}})
|
:scss {:validate true}}})
|
||||||
|
|
||||||
;(lsp.tsserver.setup {:root_dir (lsp.util.root_pattern "package.json")
|
(lsp.tsserver.setup {:root_dir (lsp.util.root_pattern "package.json")
|
||||||
;:on_attach (fn [client bufnr]
|
:on_attach (fn [client bufnr]
|
||||||
;(set client.resolved_capabilities.document_formatting false)
|
(set client.resolved_capabilities.document_formatting false)
|
||||||
;(on_attach client bufnr))})
|
(on_attach client bufnr))})
|
||||||
|
|
||||||
|
|
||||||
(let [rust-tools (require "rust-tools")
|
(let [rust-tools (require "rust-tools")
|
||||||
|
|
|
@ -8,9 +8,13 @@
|
||||||
cmp_nvim_lsp cmp_nvim_lsp}})
|
cmp_nvim_lsp cmp_nvim_lsp}})
|
||||||
|
|
||||||
|
|
||||||
|
(defn cmds [xs]
|
||||||
|
(icollect [_ x (ipairs xs)]
|
||||||
|
(.. "\\" x "{}")))
|
||||||
|
|
||||||
(def latex-command-settings
|
(def latex-command-settings
|
||||||
{:dummy ["\\texttt{}" "\\scripture{}" "\\todo{}" "\\lstref{}" "\\personaltextcite{}" "\\personalparencite{}"]
|
{:dummy (cmds ["texttt" "scripture""lstref" "figref" "tblref" "secref" "personaltextcite" "personalparencite" "game" "acsu" "enquote" "name" "item"])
|
||||||
:ignore ["\\urlfootnote{}"]})
|
:ignore (cmds ["urlfootnote" "caption" "todo"])})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -93,7 +97,7 @@
|
||||||
(lua "return (table.unpack or _G.unpack)(___antifnl_rtns_1___)")))
|
(lua "return (table.unpack or _G.unpack)(___antifnl_rtns_1___)")))
|
||||||
(if (= filetype :dictionary) (update-config lang :dictionary)
|
(if (= filetype :dictionary) (update-config lang :dictionary)
|
||||||
(= filetype :disable) (update-config lang :disable)
|
(= filetype :disable) (update-config lang :disable)
|
||||||
(= filetype :falsePositive) (update-config lang :disable)))
|
(= filetype :falsePositive) (update-config lang :falsePositive)))
|
||||||
|
|
||||||
(fn add-to [filetype lang file value]
|
(fn add-to [filetype lang file value]
|
||||||
(let [dict (read-files file)]
|
(let [dict (read-files file)]
|
||||||
|
@ -106,19 +110,19 @@
|
||||||
(defn init []
|
(defn init []
|
||||||
(set configs.ltex
|
(set configs.ltex
|
||||||
{:default_config {:cmd [:ltex-ls]
|
{:default_config {:cmd [:ltex-ls]
|
||||||
:filetypes [:tex :bib :md]
|
:filetypes [:tex :latex :bib]
|
||||||
:root_dir (fn [filename] (lsputil.path.dirname filename))}})
|
:root_dir (fn [filename] (lsputil.path.dirname filename))}})
|
||||||
|
|
||||||
(lsp.ltex.setup {:settings {:ltex {:enabled [:latex :tex :bib :md]
|
(lsp.ltex.setup {:settings {:ltex {:enabled [:latex :tex :bib]
|
||||||
:language "de-DE"
|
:language "de-DE"
|
||||||
:checkFrequency "save"
|
:checkFrequency "save"
|
||||||
:diagnosticSeverity "information"
|
:diagnosticSeverity "information"
|
||||||
:setenceCacheSize 5000
|
:setenceCacheSize 5000
|
||||||
:additionalRules {:enablePickyRules true
|
:additionalRules {:enablePickyRules true
|
||||||
:motherTongue "de-DE"}
|
:motherTongue "de-DE"}
|
||||||
:dictionary {:de-DE (read-files (. Dictionary-file :de-DE))}
|
:dictionary (utils.map-values read-files Dictionary-file)
|
||||||
:disabledRules {:de-DE (read-files (. Disabled-rules-file :de-DE))}
|
:disabledRules (utils.map-values read-files Disabled-rules-file)
|
||||||
:hiddenFalsePositives {:de-DE (read-files (. False-positives-file :de-DE))}
|
:hiddenFalsePositives (utils.map-values read-files False-positives-file)
|
||||||
:latex {:commands latex-command-settings-formatted}}}})
|
:latex {:commands latex-command-settings-formatted}}}})
|
||||||
|
|
||||||
(set lsp.ltex.dictionary_file Dictionary-file)
|
(set lsp.ltex.dictionary_file Dictionary-file)
|
||||||
|
@ -147,3 +151,6 @@
|
||||||
(local filetype :falsePositive)
|
(local filetype :falsePositive)
|
||||||
(add-to filetype lang (find-ltex-files filetype lang) rule))))
|
(add-to filetype lang (find-ltex-files filetype lang) rule))))
|
||||||
(orig-execute-command command)))))
|
(orig-execute-command command)))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
11
nvim/.config/nvim/fnl/dots/plugins/todo-comments.fnl
Normal file
11
nvim/.config/nvim/fnl/dots/plugins/todo-comments.fnl
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
(module dots.plugins.todo-comments
|
||||||
|
{autoload {a aniseed.core
|
||||||
|
todo-comments todo-comments}})
|
||||||
|
|
||||||
|
(todo-comments.setup
|
||||||
|
{:keywords {:TODO {:icon " "}
|
||||||
|
:WARN {:icon " " :alt [:WARNING :XXX :!!!]}
|
||||||
|
:NOTE {:icon " " :alt [:INFO]}
|
||||||
|
:FIX {:icon " " :alt [:FIXME :BUG :FIXIT :ISSUE :PHIX]}
|
||||||
|
:PERF {:icon " " :alt [:OPTIM :PERFORMANCE :OPTIMIZE]}
|
||||||
|
:HACK {:icon " "}}})
|
|
@ -47,6 +47,11 @@
|
||||||
(defn keep-if [f x]
|
(defn keep-if [f x]
|
||||||
(when (f x) x))
|
(when (f x) x))
|
||||||
|
|
||||||
|
(defn map-values [f t]
|
||||||
|
"Map over the values of a table, keeping the keys intact"
|
||||||
|
(collect [k v (pairs t)]
|
||||||
|
k (f v)))
|
||||||
|
|
||||||
|
|
||||||
(defn without-keys [keys t]
|
(defn without-keys [keys t]
|
||||||
(filter-table #(not (contains? keys $1)) t))
|
(filter-table #(not (contains? keys $1)) t))
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
(vim.cmd "syntax on")
|
(vim.cmd "syntax on")
|
||||||
|
|
||||||
(set vim.opt.foldmethod "marker")
|
(set vim.opt.foldmethod "marker")
|
||||||
|
(set vim.opt.scrolloff 5)
|
||||||
(set vim.opt.showmode false)
|
(set vim.opt.showmode false)
|
||||||
(set vim.opt.undodir (.. vim.env.HOME "/.vim/undo-dir"))
|
(set vim.opt.undodir (.. vim.env.HOME "/.vim/undo-dir"))
|
||||||
(set vim.opt.undofile true)
|
(set vim.opt.undofile true)
|
||||||
|
|
|
@ -14,6 +14,7 @@ export PATH="$HOME/.nix-profile/bin/:$PATH"
|
||||||
export PATH="$HOME/.cpm/bin:$PATH"
|
export PATH="$HOME/.cpm/bin:$PATH"
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
export PATH="$HOME/.nimble/bin:$PATH"
|
export PATH="$HOME/.nimble/bin:$PATH"
|
||||||
|
export PATH="$HOME/.dotnet/tools:$PATH"
|
||||||
|
|
||||||
|
|
||||||
export EDITOR="$(which nvim)"
|
export EDITOR="$(which nvim)"
|
||||||
|
|
|
@ -18,11 +18,11 @@ if [ $to_file -eq 1 ]; then
|
||||||
file="$HOME/Bilder/screenshots/screenshot_$(date +%s).png"
|
file="$HOME/Bilder/screenshots/screenshot_$(date +%s).png"
|
||||||
echo "$file"
|
echo "$file"
|
||||||
[ -z "$select_flag" ] && sleep 1
|
[ -z "$select_flag" ] && sleep 1
|
||||||
maim $select_flag --format png "$file"
|
maim -u $select_flag --format png "$file"
|
||||||
echo "$file" | xclip -selection clipboard
|
echo "$file" | xclip -selection clipboard
|
||||||
else
|
else
|
||||||
[ -z "$select_flag" ] && sleep 1
|
[ -z "$select_flag" ] && sleep 1
|
||||||
maim $select_flag --format png /dev/stdout | xclip -selection clipboard -t image/png -i
|
maim -u $select_flag --format png /dev/stdout | xclip -selection clipboard -t image/png -i
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue