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