mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-11-06 03:12:24 +00:00
Retheme of nvim
This commit is contained in:
parent
fe4a5cf0b1
commit
59d79c12ec
7 changed files with 85 additions and 59 deletions
|
@ -117,9 +117,6 @@
|
||||||
:ray-x/lsp_signature.nvim {:events [:BufEnter]}
|
:ray-x/lsp_signature.nvim {:events [:BufEnter]}
|
||||||
:weilbith/nvim-code-action-menu {}
|
:weilbith/nvim-code-action-menu {}
|
||||||
|
|
||||||
;:elkowar/trouble.nvim {:config #(require "dots.plugins.trouble")
|
|
||||||
;:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]
|
|
||||||
|
|
||||||
:folke/lsp-trouble.nvim {:opt false :config #(require "dots.plugins.trouble")
|
:folke/lsp-trouble.nvim {:opt false :config #(require "dots.plugins.trouble")
|
||||||
:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]}
|
:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]}
|
||||||
|
|
||||||
|
@ -127,10 +124,6 @@
|
||||||
|
|
||||||
:neovim/nvim-lspconfig {}
|
:neovim/nvim-lspconfig {}
|
||||||
|
|
||||||
;:ms-jpq/coq_nvim {:opt false :config #(require "dots.plugins.coq-nvim")
|
|
||||||
;:branch "coq"
|
|
||||||
;:ms-jpq/coq.artifacts {:branch "artifacts"}
|
|
||||||
|
|
||||||
:tami5/lspsaga.nvim {:after "vim-gruvbox8"
|
:tami5/lspsaga.nvim {:after "vim-gruvbox8"
|
||||||
:opt false
|
:opt false
|
||||||
:branch "nvim6.0"
|
:branch "nvim6.0"
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
(..
|
(..
|
||||||
"
|
"
|
||||||
augroup gitsignsHighlight
|
augroup gitsignsHighlight
|
||||||
autocmd ColorScheme * :hi! GitSignsAdd gui='NONE' guibg='NONE' guifg='" colors.bright_aqua "'
|
autocmd! ColorScheme * :hi! GitSignsAdd gui='NONE' guibg='NONE' guifg='" colors.bright_aqua "'
|
||||||
autocmd ColorScheme * :hi! GitSignsDelete gui='NONE' guibg='NONE' guifg='" colors.neutral_red "'
|
autocmd! ColorScheme * :hi! GitSignsDelete gui='NONE' guibg='NONE' guifg='" colors.neutral_red "'
|
||||||
autocmd ColorScheme * :hi! GitSignsChange gui='NONE' guibg='NONE' guifg='" colors.bright_blue "'
|
autocmd! ColorScheme * :hi! GitSignsChange gui='NONE' guibg='NONE' guifg='" colors.bright_blue "'
|
||||||
augroup END
|
augroup END
|
||||||
"))
|
"))
|
||||||
;(utils.highlight :GitSignsAdd {:bg "NONE" :fg colors.bright_aqua})
|
;(utils.highlight :GitSignsAdd {:bg "NONE" :fg colors.bright_aqua})
|
||||||
|
|
|
@ -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")
|
||||||
|
|
|
@ -2,24 +2,25 @@
|
||||||
{autoload {utils dots.utils
|
{autoload {utils dots.utils
|
||||||
colors dots.colors}
|
colors dots.colors}
|
||||||
|
|
||||||
require {saga lspsaga}})
|
require {saga lspsaga}
|
||||||
|
require-macros [macros]})
|
||||||
|
|
||||||
;(saga.init_lsp_saga
|
|
||||||
;{:border_style "single" ; single double round plus
|
|
||||||
;:code_action_prompt {:enable true
|
|
||||||
;:sign false
|
|
||||||
;:virtual_text false}
|
|
||||||
;:code_action_keys {:quit "<esc>" :exec "<CR>"}
|
|
||||||
;:rename_action_keys {:quit "<esc>" :exec "<CR>"}
|
|
||||||
;:finder_action_keys {:quit "<esc>"
|
|
||||||
;:open "<CR>"
|
|
||||||
;:vsplit "v"
|
|
||||||
;:split "b"
|
|
||||||
;:scroll_up "<C-u>"
|
|
||||||
;:scroll_down "<C-d>"}})
|
|
||||||
|
|
||||||
|
(saga.init_lsp_saga
|
||||||
|
{:border_style "single" ; single double round plus
|
||||||
|
:code_action_prompt {:enable true
|
||||||
|
:sign false
|
||||||
|
:virtual_text false}
|
||||||
|
:code_action_keys {:quit "<esc>" :exec "<CR>"}
|
||||||
|
:rename_action_keys {:quit "<esc>" :exec "<CR>"}
|
||||||
|
:finder_action_keys {:quit "<esc>"
|
||||||
|
:open "<CR>"
|
||||||
|
:vsplit "v"
|
||||||
|
:split "b"
|
||||||
|
:scroll_up "<C-u>"
|
||||||
|
:scroll_down "<C-d>"}})
|
||||||
|
|
||||||
|
(defer
|
||||||
|
(do
|
||||||
(utils.highlight ["LspFloatWinBorder"
|
(utils.highlight ["LspFloatWinBorder"
|
||||||
"LspSagaHoverBorder"
|
"LspSagaHoverBorder"
|
||||||
"LspSagaRenameBorder"
|
"LspSagaRenameBorder"
|
||||||
|
@ -40,10 +41,10 @@
|
||||||
"LspSagaCodeActionContent"
|
"LspSagaCodeActionContent"
|
||||||
"LspSagaFinderSelection"
|
"LspSagaFinderSelection"
|
||||||
"LspSagaDiagnosticHeader"]
|
"LspSagaDiagnosticHeader"]
|
||||||
{:fg colors.bright_aqua})
|
{:fg colors.bright_aqua :bg colors.dark0_hard})
|
||||||
|
|
||||||
|
|
||||||
(utils.highlight "LspFloatWinNormal" {:bg colors.dark0_hard})
|
(utils.highlight "LspFloatWinNormal" {:bg colors.dark0_hard})
|
||||||
(utils.highlight "LspFloatWinBorder" {:bg colors.dark0_hard
|
(utils.highlight "LspFloatWinBorder" {:bg colors.dark0_hard
|
||||||
:fg colors.dark0_hard})
|
:fg colors.dark0_hard})
|
||||||
(utils.highlight "TargetWord" {:fg colors.bright_aqua})
|
(utils.highlight "TargetWord" {:fg colors.bright_aqua})))
|
||||||
|
|
|
@ -122,3 +122,25 @@
|
||||||
(defn comp [f g]
|
(defn comp [f g]
|
||||||
(fn [...]
|
(fn [...]
|
||||||
(f (g ...))))
|
(f (g ...))))
|
||||||
|
|
||||||
|
|
||||||
|
; These are a workaround around broken load order
|
||||||
|
; mostly used for themeing stuff
|
||||||
|
; given that the colorscheme may override highlight stuff set before it loaded, this can _ensure_
|
||||||
|
; that code is ran at the very end of the config
|
||||||
|
|
||||||
|
(var deferred-funs [])
|
||||||
|
(var did-exec-deferred false)
|
||||||
|
(defn clear-deferred [] (set deferred-funs []))
|
||||||
|
|
||||||
|
; defer a function. If deferred funcs have already been ran,
|
||||||
|
; assume we're reloading config because the user is configuring, and just execute immediately
|
||||||
|
(defn defer-to-end [f]
|
||||||
|
(if did-exec-deferred
|
||||||
|
(f)
|
||||||
|
(table.insert deferred-funs f)))
|
||||||
|
|
||||||
|
(defn run-deferred []
|
||||||
|
(set did-exec-deferred true)
|
||||||
|
(each [_ f (ipairs deferred-funs)]
|
||||||
|
(f)))
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
str aniseed.string
|
str aniseed.string
|
||||||
colors dots.colors}
|
colors dots.colors}
|
||||||
require-macros [macros]})
|
require-macros [macros]})
|
||||||
|
(utils.clear-deferred)
|
||||||
|
|
||||||
(macro make-errors-epic [f]
|
(macro make-errors-epic [f]
|
||||||
`(xpcall #,f #(let [fennel# (require :aniseed.fennel)]
|
`(xpcall #,f #(let [fennel# (require :aniseed.fennel)]
|
||||||
|
@ -201,6 +201,9 @@
|
||||||
(vim.cmd
|
(vim.cmd
|
||||||
"command! -nargs=1 L :lua print(vim.inspect(<args>))")
|
"command! -nargs=1 L :lua print(vim.inspect(<args>))")
|
||||||
|
|
||||||
|
|
||||||
|
(utils.run-deferred)
|
||||||
|
|
||||||
; vim:foldmarker=foldstart,foldend
|
; vim:foldmarker=foldstart,foldend
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,12 @@
|
||||||
,...
|
,...
|
||||||
(nvim.ex.augroup :END)))
|
(nvim.ex.augroup :END)))
|
||||||
|
|
||||||
|
:defer
|
||||||
|
(fn [...]
|
||||||
|
`(let [utils# (require :dots.utils)]
|
||||||
|
(utils#.defer-to-end (fn [] ,...))))
|
||||||
|
|
||||||
|
|
||||||
:req
|
:req
|
||||||
(fn [name ...]
|
(fn [name ...]
|
||||||
(let [str (require :aniseed.string)
|
(let [str (require :aniseed.string)
|
||||||
|
@ -95,3 +101,4 @@
|
||||||
`(,use-sym ,v#)))))))))}
|
`(,use-sym ,v#)))))))))}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue