mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-11-06 03:12:24 +00:00
cleanup bufferline
This commit is contained in:
parent
5e1361cd92
commit
312a1809bd
4 changed files with 59 additions and 47 deletions
|
@ -1,12 +1,17 @@
|
|||
(import-macros {: al} :macros)
|
||||
(al a nfnl.core)
|
||||
(al utils dots.utils)
|
||||
(al colors dots.colors)
|
||||
(al bufferline bufferline)
|
||||
(local {: autoload} (require :nfnl.module))
|
||||
(local a (autoload :aniseed.core))
|
||||
(local utils (autoload :dots.utils))
|
||||
(local bufferline (autoload :bufferline))
|
||||
(local colors (autoload :dots.colors))
|
||||
|
||||
(vim.cmd "hi link BufferLineTabSeparatorSelected BufferLineSeparatorSelected")
|
||||
(vim.cmd "hi link BufferLineTabSeparator BufferLineSeparator")
|
||||
|
||||
(fn mk-active [fg]
|
||||
{:bg colors.neutral_aqua :fg fg :italic false :bold false})
|
||||
(fn mk-visible [fg]
|
||||
{:bg colors.dark1 :fg fg :italic false :bold false})
|
||||
|
||||
(fn setup []
|
||||
; :h bufferline-lua-highlights
|
||||
(let [selected {:bg colors.neutral_aqua :fg colors.bg_main :gui "NONE"}
|
||||
|
@ -14,7 +19,7 @@
|
|||
(bufferline.setup
|
||||
{:options
|
||||
{:diagnostics "nvim_lsp"
|
||||
:diagnostics_indicator (fn [cnt lvl diagnostics-dict] (.. " (" cnt ")"))
|
||||
:diagnostics_indicator (fn [cnt _lvl _diagnostics-dict] (.. " (" cnt ")"))
|
||||
:show_buffer_close_icons false
|
||||
:show_buffer_icons false
|
||||
:show_close_icon false
|
||||
|
@ -28,30 +33,35 @@
|
|||
:background visible
|
||||
:buffer_visible visible
|
||||
:buffer_selected (a.assoc selected :bold false :italic false)
|
||||
:modified visible :modified_selected selected :modified_visible visible
|
||||
:info visible :info_selected selected :info_visible visible
|
||||
:warning visible :warning_selected selected :warning_visible visible
|
||||
:error visible :error_selected selected :error_visible visible
|
||||
:duplicate visible :duplicate_selected selected :duplicate_visible visible
|
||||
:modified visible :modified_visible visible :modified_selected selected
|
||||
:hint visible :hint_visible visible :hint_selected selected
|
||||
:info visible :info_visible visible :info_selected selected
|
||||
:warning visible :warning_visible visible :warning_selected selected
|
||||
:error visible :error_visible visible :error_selected selected
|
||||
:duplicate visible :duplicate_visible visible :duplicate_selected selected
|
||||
|
||||
:diagnostic {:bg colors.dark1 :fg colors.neutral_red}
|
||||
:diagnostic_visible {:bg colors.dark1 :fg colors.neutral_red}
|
||||
:diagnostic_selected {:bg colors.neutral_aqua :fg colors.faded_redu}
|
||||
:diagnostic (mk-visible colors.neutral_red)
|
||||
:diagnostic_visible (mk-visible colors.neutral_red)
|
||||
:diagnostic_selected (mk-active colors.faded_red)
|
||||
|
||||
:info_diagnostic {:bg colors.dark1 :fg colors.neutral_blue}
|
||||
:info_diagnostic_visible {:bg colors.dark1 :fg colors.neutral_blue}
|
||||
:info_diagnostic_selected {:bg colors.neutral_aqua :fg colors.faded_blue}
|
||||
:info_diagnostic (mk-visible colors.neutral_blue)
|
||||
:info_diagnostic_visible (mk-visible colors.neutral_blue)
|
||||
:info_diagnostic_selected (mk-active colors.faded_blue)
|
||||
|
||||
:warning_diagnostic {:bg colors.dark1 :fg colors.neutral_yellow}
|
||||
:warning_diagnostic_visible {:bg colors.dark1 :fg colors.neutral_yellow}
|
||||
:warning_diagnostic_selected {:bg colors.neutral_aqua :fg colors.faded_yellow}
|
||||
:hint_diagnostic (mk-visible colors.neutral_yellow)
|
||||
:hint_diagnostic_visible (mk-visible colors.neutral_yellow)
|
||||
:hint_diagnostic_selected (mk-active colors.faded_orange)
|
||||
|
||||
:error_diagnostic {:bg colors.dark1 :fg colors.neutral_red}
|
||||
:error_diagnostic_visible {:bg colors.dark1 :fg colors.neutral_red}
|
||||
:error_diagnostic_selected {:bg colors.neutral_aqua :fg colors.red}
|
||||
:warning_diagnostic (mk-visible colors.neutral_orange)
|
||||
:warning_diagnostic_visible (mk-visible colors.neutral_orange)
|
||||
:warning_diagnostic_selected (mk-active colors.faded_orange)
|
||||
|
||||
:error_diagnostic (mk-visible colors.neutral_red)
|
||||
:error_diagnostic_visible (mk-visible colors.neutral_red)
|
||||
:error_diagnostic_selected (mk-active colors.red)
|
||||
|
||||
:separator visible
|
||||
:indicator_selected {:bg colors.neutral_aqua :fg colors.neutral_aqua}
|
||||
:indicator_selected {:bg colors.neutral_aqua :fg colors.neutral_aqua :italic false :bold false}
|
||||
:tab_separator {:bg colors.red}
|
||||
:tab_separator_selected {:bg colors.neutral_aqua :fg colors.neutral_aqua}
|
||||
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
(import-macros {: al} :macros)
|
||||
(al a aniseed.core)
|
||||
(al str aniseed.string)
|
||||
(al lsp lspconfig)
|
||||
(al lsp-configs lspconfig/configs)
|
||||
(al utils dots.utils)
|
||||
(al ltex-ls dots.plugins.ltex-ls)
|
||||
(al cmp_nvim_lsp cmp_nvim_lsp)
|
||||
(local {: autoload} (require :nfnl.module))
|
||||
(local a (autoload :aniseed.core))
|
||||
(local lsp (autoload :lspconfig))
|
||||
(local lsp-configs (autoload :lspconfig/configs))
|
||||
(local utils (autoload :dots.utils))
|
||||
(local cmp_nvim_lsp (autoload :cmp_nvim_lsp))
|
||||
|
||||
(fn setup []
|
||||
; TODO check https://github.com/neovim/nvim-lspconfig/blob/master/ADVANCED_README.md for default config for all of them
|
||||
|
@ -50,7 +48,7 @@
|
|||
((lsp.util.root_pattern patterns) path))))
|
||||
|
||||
; advertise snippet support
|
||||
(def default-capabilities
|
||||
(local default-capabilities
|
||||
(let [capabilities (vim.lsp.protocol.make_client_capabilities)]
|
||||
(set capabilities.textDocument.completion.completionItem.snippetSupport true)
|
||||
(cmp_nvim_lsp.default_capabilities capabilities)))
|
||||
|
@ -128,16 +126,19 @@
|
|||
|
||||
;:cmd ["/home/leon/coding/prs/rust-analyzer/target/release/rust-analyzer"]}}))
|
||||
|
||||
(when (not lsp.fennel_language_server)
|
||||
(when (or true (not lsp.fennel_language_server))
|
||||
(tset lsp-configs :fennel_language_server
|
||||
{:default_config {:cmd "/Users/leon/.cargo/bin/fennel-language-server"
|
||||
:filetypes [:fennel]
|
||||
:single_file_support true
|
||||
:root_dir (lsp.util.root_pattern "fnl")
|
||||
:root_dir (lsp.util.root_pattern ["fnl" "init.lua"])
|
||||
:settings {:fennel {:workspace {:library (vim.api.nvim_list_runtime_paths)}
|
||||
:diagnostics {:globals [:vim]}}}}}))
|
||||
|
||||
(init-lsp :fennel_language_server)
|
||||
(init-lsp :fennel_language_server
|
||||
{:root_dir (lsp.util.root_pattern ["fnl" "init.lua"])
|
||||
:settings {:fennel {:workspace {:library (vim.api.nvim_list_runtime_paths)}
|
||||
:diagnostics {:globals [:vim :comment]}}}})
|
||||
;
|
||||
;
|
||||
|
||||
|
@ -180,7 +181,7 @@
|
|||
|
||||
; Idris2 ----------------------------------------------------------- <<<<<
|
||||
|
||||
(def autostart-semantic-highlighting true)
|
||||
(local autostart-semantic-highlighting true)
|
||||
(fn refresh-semantic-highlighting []
|
||||
(when autostart-semantic-highlighting
|
||||
(vim.lsp.buf_request 0
|
||||
|
@ -265,5 +266,5 @@
|
|||
(tset result :contents new-contents)
|
||||
(previous-handler a result b c)))))))
|
||||
|
||||
[(utils.plugin :neovim/nvim-lspconfig {:event "VeryLazy" :lazy true})]
|
||||
[(utils.plugin :neovim/nvim-lspconfig {:event "VeryLazy" :lazy true :config setup})]
|
||||
; vim:foldmarker=<<<<<,>>>>>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
(import-macros m :macros)
|
||||
(m.al utils dots.utils)
|
||||
(m.al colors dots.colors)
|
||||
(m.al trouble trouble)
|
||||
(local {: autoload} (require :nfnl.module))
|
||||
(local utils (autoload :dots.utils))
|
||||
(local colors (autoload :dots.colors))
|
||||
(local trouble (autoload :trouble))
|
||||
|
||||
(fn setup []
|
||||
(trouble.setup
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
(import-macros {: al : vim-let} :macros)
|
||||
(al a nfnl.core)
|
||||
(al utils dots.utils)
|
||||
(al str nfnl.string)
|
||||
(al colors dots.colors)
|
||||
(import-macros {: vim-let} :macros)
|
||||
|
||||
(local {: autoload} (require :nfnl.module))
|
||||
(local a (autoload :aniseed.core))
|
||||
(local str (autoload :aniseed.string))
|
||||
(local utils (autoload :dots.utils))
|
||||
(local lazy (require :lazy))
|
||||
|
||||
(utils.clear-deferred)
|
||||
|
|
Loading…
Reference in a new issue