mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-25 21:52:23 +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]}
|
||||
: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")
|
||||
:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]}
|
||||
|
||||
|
@ -127,10 +124,6 @@
|
|||
|
||||
: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"
|
||||
:opt false
|
||||
:branch "nvim6.0"
|
||||
|
|
|
@ -20,9 +20,9 @@
|
|||
(..
|
||||
"
|
||||
augroup gitsignsHighlight
|
||||
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! GitSignsChange gui='NONE' guibg='NONE' guifg='" colors.bright_blue "'
|
||||
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! GitSignsChange gui='NONE' guibg='NONE' guifg='" colors.bright_blue "'
|
||||
augroup END
|
||||
"))
|
||||
;(utils.highlight :GitSignsAdd {:bg "NONE" :fg colors.bright_aqua})
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
((. lsp lsp-name :setup) merged-opts)))
|
||||
|
||||
(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 :ocamllsp)
|
||||
(init-lsp :vimls)
|
||||
|
@ -97,10 +97,10 @@
|
|||
:less {:validate true}
|
||||
:scss {:validate true}}})
|
||||
|
||||
(lsp.tsserver.setup {:root_dir (lsp.util.root_pattern "package.json")
|
||||
:on_attach (fn [client bufnr]
|
||||
(set client.resolved_capabilities.document_formatting false)
|
||||
(on_attach client bufnr))})
|
||||
;(lsp.tsserver.setup {:root_dir (lsp.util.root_pattern "package.json")
|
||||
;:on_attach (fn [client bufnr]
|
||||
;(set client.resolved_capabilities.document_formatting false)
|
||||
;(on_attach client bufnr))})
|
||||
|
||||
|
||||
(let [rust-tools (require "rust-tools")
|
||||
|
|
|
@ -2,48 +2,49 @@
|
|||
{autoload {utils dots.utils
|
||||
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>"}})
|
||||
|
||||
(defer
|
||||
(do
|
||||
(utils.highlight ["LspFloatWinBorder"
|
||||
"LspSagaHoverBorder"
|
||||
"LspSagaRenameBorder"
|
||||
"LspSagaSignatureHelpBorder"
|
||||
"LspSagaCodeActionBorder"
|
||||
"LspSagaDefPreviewBorder"
|
||||
"LspSagaDiagnosticBorder"]
|
||||
{:bg colors.dark0_hard :fg colors.dark0_hard})
|
||||
|
||||
(utils.highlight ["LspSagaDiagnosticTruncateLine"
|
||||
"LspSagaDocTruncateLine"
|
||||
"LspSagaShTruncateLine"]
|
||||
{:bg "NONE" :fg colors.dark0})
|
||||
|
||||
(utils.highlight ["TargetWord"
|
||||
"LspSagaCodeActionTitle"
|
||||
"LspSagaBorderTitle"
|
||||
"LspSagaCodeActionContent"
|
||||
"LspSagaFinderSelection"
|
||||
"LspSagaDiagnosticHeader"]
|
||||
{:fg colors.bright_aqua :bg colors.dark0_hard})
|
||||
|
||||
|
||||
;(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>"}})
|
||||
|
||||
|
||||
(utils.highlight ["LspFloatWinBorder"
|
||||
"LspSagaHoverBorder"
|
||||
"LspSagaRenameBorder"
|
||||
"LspSagaSignatureHelpBorder"
|
||||
"LspSagaCodeActionBorder"
|
||||
"LspSagaDefPreviewBorder"
|
||||
"LspSagaDiagnosticBorder"]
|
||||
{:bg colors.dark0_hard :fg colors.dark0_hard})
|
||||
|
||||
(utils.highlight ["LspSagaDiagnosticTruncateLine"
|
||||
"LspSagaDocTruncateLine"
|
||||
"LspSagaShTruncateLine"]
|
||||
{:bg "NONE" :fg colors.dark0})
|
||||
|
||||
(utils.highlight ["TargetWord"
|
||||
"LspSagaCodeActionTitle"
|
||||
"LspSagaBorderTitle"
|
||||
"LspSagaCodeActionContent"
|
||||
"LspSagaFinderSelection"
|
||||
"LspSagaDiagnosticHeader"]
|
||||
{:fg colors.bright_aqua})
|
||||
|
||||
|
||||
(utils.highlight "LspFloatWinNormal" {:bg colors.dark0_hard})
|
||||
(utils.highlight "LspFloatWinBorder" {:bg colors.dark0_hard
|
||||
:fg colors.dark0_hard})
|
||||
(utils.highlight "TargetWord" {:fg colors.bright_aqua})
|
||||
(utils.highlight "LspFloatWinNormal" {:bg colors.dark0_hard})
|
||||
(utils.highlight "LspFloatWinBorder" {:bg colors.dark0_hard
|
||||
:fg colors.dark0_hard})
|
||||
(utils.highlight "TargetWord" {:fg colors.bright_aqua})))
|
||||
|
|
|
@ -122,3 +122,25 @@
|
|||
(defn comp [f g]
|
||||
(fn [...]
|
||||
(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
|
||||
colors dots.colors}
|
||||
require-macros [macros]})
|
||||
|
||||
(utils.clear-deferred)
|
||||
|
||||
(macro make-errors-epic [f]
|
||||
`(xpcall #,f #(let [fennel# (require :aniseed.fennel)]
|
||||
|
@ -201,6 +201,9 @@
|
|||
(vim.cmd
|
||||
"command! -nargs=1 L :lua print(vim.inspect(<args>))")
|
||||
|
||||
|
||||
(utils.run-deferred)
|
||||
|
||||
; vim:foldmarker=foldstart,foldend
|
||||
|
||||
|
||||
|
|
|
@ -6,6 +6,12 @@
|
|||
,...
|
||||
(nvim.ex.augroup :END)))
|
||||
|
||||
:defer
|
||||
(fn [...]
|
||||
`(let [utils# (require :dots.utils)]
|
||||
(utils#.defer-to-end (fn [] ,...))))
|
||||
|
||||
|
||||
:req
|
||||
(fn [name ...]
|
||||
(let [str (require :aniseed.string)
|
||||
|
@ -95,3 +101,4 @@
|
|||
`(,use-sym ,v#)))))))))}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue