diff --git a/files/.config/nvim/fnl/keybinds.fnl b/files/.config/nvim/fnl/keybinds.fnl index 8d1a2df..a48fedc 100644 --- a/files/.config/nvim/fnl/keybinds.fnl +++ b/files/.config/nvim/fnl/keybinds.fnl @@ -42,7 +42,8 @@ "A" (cmd "Lspsaga show_line_diagnostics" "Line diagnostics") "E" (cmd "Telescope lsp_workspace_diagnostics" "List diagnostics") "r" (cmd "Telescope lsp_references" "Show references") - "e" (le "vim.lsp.diagnostic.goto_next()" "Jump to the next error") + "e" (cmd "LspTroubleOpen" "Show diagnostics") + ;"e" (le "vim.lsp.diagnostic.goto_next()" "Jump to the next error") "g" (le "vim.lsp.buf.definition()" "Go to definition") "i" (le "vim.lsp.buf.implementation()" "Show implementation") "f" (le "vim.lsp.buf.formatting()" "format file")} @@ -67,11 +68,12 @@ { :prefix ""}) (wk.register - { :name "+folds" - "c" (cmd "foldclose" "close fold") - "o" (cmd "foldopen" "open fold")} - { :prefix "z"}) - + { + "" "which_key_ignore" + "z" { :name "+folds" + "c" (cmd "foldclose" "close fold") + "o" (cmd "foldopen" "open fold")}}) + (set nvim.o.timeoutlen 200) diff --git a/files/.config/nvim/fnl/plugins/bufferline.fnl b/files/.config/nvim/fnl/plugins/bufferline.fnl index 90b8e03..85a6b3e 100644 --- a/files/.config/nvim/fnl/plugins/bufferline.fnl +++ b/files/.config/nvim/fnl/plugins/bufferline.fnl @@ -30,7 +30,7 @@ :modified_selected selected :error visible :error_selected selected - :error_visible visible + :error_visible selected :warning visible :warning_selected selected :warning_visible visible diff --git a/files/.config/nvim/fnl/plugins/lsp.fnl b/files/.config/nvim/fnl/plugins/lsp.fnl index a962b30..c6bca49 100644 --- a/files/.config/nvim/fnl/plugins/lsp.fnl +++ b/files/.config/nvim/fnl/plugins/lsp.fnl @@ -8,9 +8,13 @@ utils utils compe compe lsp_signature lsp_signature - symbols-outline symbols-outline} + symbols-outline symbols-outline + trouble trouble} require-macros [macros]}) + +(local colors (utils.colors)) + (fn on_attach [client bufnr] (lsp_signature.on_attach) (if client.resolved_capabilities.document_highlight @@ -97,11 +101,32 @@ :scroll_down ""}}) -(utils.highlight "LspSagaCodeActionTitle" {:fg "#8ec07c"}) -(utils.highlight "LspSagaBorderTitle" {:fg "#8ec07c"}) -(utils.highlight "LspSagaCodeActionContent" {:fg "#8ec07c"}) -(utils.highlight "LspSagaFinderSelection" {:fg "#8ec07c"}) -(utils.highlight "LspSagaDiagnosticHeader" {:fg "#8ec07c"}) -(utils.highlight "TargetWord" {:fg "#8ec07c"}) +(utils.highlight "LspSagaCodeActionTitle" {:fg colors.bright_aqua}) +(utils.highlight "LspSagaBorderTitle" {:fg colors.bright_aqua}) +(utils.highlight "LspSagaCodeActionContent" {:fg colors.bright_aqua}) +(utils.highlight "LspSagaFinderSelection" {:fg colors.bright_aqua}) +(utils.highlight "LspSagaDiagnosticHeader" {:fg colors.bright_aqua}) +(utils.highlight "TargetWord" {:fg colors.bright_aqua}) + + +(utils.highlight "LspTroubleFoldIcon" {:bg "NONE" :fg colors.bright_orange}) +(utils.highlight "LspTroubleCount" {:bg "NONE" :fg colors.bright_green}) +(utils.highlight "LspTroubleText" {:bg "NONE" :fg colors.light0}) + +(utils.highlight "LspTroubleSignError" {:bg "NONE" :fg colors.bright_red}) +(utils.highlight "LspTroubleSignWarning" {:bg "NONE" :fg colors.bright_yellow}) +(utils.highlight "LspTroubleSignInformation" {:bg "NONE" :fg colors.bright_aqua}) +(utils.highlight "LspTroubleSignHint" {:bg "NONE" :fg colors.bright_blue}) + (set vim.o.signcolumn "yes") + + + + +(trouble.setup + {:icons false + :auto_preview true + :auto_close true + :auto_open false}) + diff --git a/files/.config/nvim/lua/keybinds.lua b/files/.config/nvim/lua/keybinds.lua index 40c35ff..abbcaac 100644 --- a/files/.config/nvim/lua/keybinds.lua +++ b/files/.config/nvim/lua/keybinds.lua @@ -50,7 +50,7 @@ end local function rebind(s, desc) return {s, desc} end -wk.register({[":"] = cmd("Telescope commands", "Search command with fzf"), b = {b = cmd("Buffers", "select open buffer"), c = cmd("bdelete!", "close open buffer"), name = "+buffers", w = cmd("bwipeout!", "wipeout open buffer")}, c = {name = "+comment out"}, e = {name = "+emmet"}, f = {j = rebind("zj", "jump to next fold"), k = rebind("zk", "jump to previous fold"), n = cmd("foldclose", "close fold"), name = "+folds", o = cmd("foldopen", "open fold")}, h = cmd("bprevious", "previous buffer"), l = cmd("bnext", "next buffer"), m = {A = cmd("Lspsaga show_line_diagnostics", "Line diagnostics"), E = cmd("Telescope lsp_workspace_diagnostics", "List diagnostics"), S = cmd("Telescope lsp_document_symbols", "Symbols in document"), a = cmd("Lspsaga show_cursor_diagnostics", "Cursor diagnostics"), b = cmd("Lspsaga lsp_finder", "Find stuff"), d = cmd("Lspsaga hover_doc", "Show documentation"), e = le("vim.lsp.diagnostic.goto_next()", "Jump to the next error"), f = le("vim.lsp.buf.formatting()", "format file"), g = le("vim.lsp.buf.definition()", "Go to definition"), i = le("vim.lsp.buf.implementation()", "Show implementation"), n = cmd("Lspsaga rename", "Rename"), name = "+Code actions", o = cmd("SymbolsOutline", "Outline"), r = cmd("Telescope lsp_references", "Show references"), s = cmd("Telescope lsp_dynamic_workspace_symbols", "Symbols in workspace"), t = cmd("Lspsaga signature_help", "Show signature help"), v = cmd("Lspsaga code_action", "Apply codeaction"), x = cmd("Lspsaga preview_definition", "Preview definition")}, o = cmd("Telescope live_grep", "Grep files"), p = cmd("Telescope file_browser", "Open file-browser"), v = {g = cmd("Goyo | set linebreak", "toggle focus mode"), i = cmd("IndentGuidesToggle", "toggle indent guides"), m = cmd("set nonumber! norelativenumber", "toggle numbers"), n = cmd("set relativenumber!", "toggle relative numbers"), name = "+view-and-layout"}}, {prefix = ""}) -wk.register({c = cmd("foldclose", "close fold"), name = "+folds", o = cmd("foldopen", "open fold")}, {prefix = "z"}) +wk.register({[":"] = cmd("Telescope commands", "Search command with fzf"), b = {b = cmd("Buffers", "select open buffer"), c = cmd("bdelete!", "close open buffer"), name = "+buffers", w = cmd("bwipeout!", "wipeout open buffer")}, c = {name = "+comment out"}, e = {name = "+emmet"}, f = {j = rebind("zj", "jump to next fold"), k = rebind("zk", "jump to previous fold"), n = cmd("foldclose", "close fold"), name = "+folds", o = cmd("foldopen", "open fold")}, h = cmd("bprevious", "previous buffer"), l = cmd("bnext", "next buffer"), m = {A = cmd("Lspsaga show_line_diagnostics", "Line diagnostics"), E = cmd("Telescope lsp_workspace_diagnostics", "List diagnostics"), S = cmd("Telescope lsp_document_symbols", "Symbols in document"), a = cmd("Lspsaga show_cursor_diagnostics", "Cursor diagnostics"), b = cmd("Lspsaga lsp_finder", "Find stuff"), d = cmd("Lspsaga hover_doc", "Show documentation"), e = cmd("LspTroubleOpen", "Show diagnostics"), f = le("vim.lsp.buf.formatting()", "format file"), g = le("vim.lsp.buf.definition()", "Go to definition"), i = le("vim.lsp.buf.implementation()", "Show implementation"), n = cmd("Lspsaga rename", "Rename"), name = "+Code actions", o = cmd("SymbolsOutline", "Outline"), r = cmd("Telescope lsp_references", "Show references"), s = cmd("Telescope lsp_dynamic_workspace_symbols", "Symbols in workspace"), t = cmd("Lspsaga signature_help", "Show signature help"), v = cmd("Lspsaga code_action", "Apply codeaction"), x = cmd("Lspsaga preview_definition", "Preview definition")}, o = cmd("Telescope live_grep", "Grep files"), p = cmd("Telescope file_browser", "Open file-browser"), v = {g = cmd("Goyo | set linebreak", "toggle focus mode"), i = cmd("IndentGuidesToggle", "toggle indent guides"), m = cmd("set nonumber! norelativenumber", "toggle numbers"), n = cmd("set relativenumber!", "toggle relative numbers"), name = "+view-and-layout"}}, {prefix = ""}) +wk.register({[""] = "which_key_ignore", z = {c = cmd("foldclose", "close fold"), name = "+folds", o = cmd("foldopen", "open fold")}}) nvim.o.timeoutlen = 200 return nil \ No newline at end of file diff --git a/files/.config/nvim/lua/plugins/bufferline.lua b/files/.config/nvim/lua/plugins/bufferline.lua index d3ede6c..08007a1 100644 --- a/files/.config/nvim/lua/plugins/bufferline.lua +++ b/files/.config/nvim/lua/plugins/bufferline.lua @@ -45,6 +45,6 @@ do local function _2_(cnt, lvl, diagnostics_dict) return (" (" .. cnt .. ")") end - bufferline.setup({highlights = {background = visible, buffer_selected = selected, buffer_visible = visible, error = visible, error_selected = selected, error_visible = visible, fill = {guibg = colors.dark0, guifg = colors.light0}, indicator_selected = {guibg = colors.neutral_aqua, guifg = colors.neutral_aqua}, modified = visible, modified_selected = selected, modified_visible = visible, pick_selected = {guibg = colors.bright_red, guifg = colors.bright_red}, separator = visible, tab = {guibg = colors.bright_yellow, guifg = colors.bright_yellow}, tab_selected = {guibg = colors.bright_green, guifg = colors.bright_green}, warning = visible, warning_selected = selected, warning_visible = visible}, options = {diagnostics = "nvim_lsp", diagnostics_indicator = _2_, enforce_regular_tabs = false, show_buffer_close_icons = false, show_close_icon = false, show_tab_indicators = false, tab_size = 10}}) + bufferline.setup({highlights = {background = visible, buffer_selected = selected, buffer_visible = visible, error = visible, error_selected = selected, error_visible = selected, fill = {guibg = colors.bright_red, guifg = colors.light0}, indicator_selected = {guibg = colors.neutral_aqua, guifg = colors.neutral_aqua}, modified = visible, modified_selected = selected, modified_visible = visible, pick_selected = {guibg = colors.bright_red, guifg = colors.bright_red}, separator = visible, tab = {guibg = colors.bright_yellow, guifg = colors.bright_yellow}, tab_selected = {guibg = colors.bright_green, guifg = colors.bright_green}, warning = visible, warning_selected = selected, warning_visible = visible}, options = {diagnostics = "nvim_lsp", diagnostics_indicator = _2_, enforce_regular_tabs = false, show_buffer_close_icons = false, show_close_icon = false, show_tab_indicators = false, tab_size = 10}}) end return utils.highlight("BufferLineInfoSelected", {bg = colors.neutral_aqua, fg = colors.dark0, gui = "NONE"}) \ No newline at end of file diff --git a/files/.config/nvim/lua/plugins/lsp.lua b/files/.config/nvim/lua/plugins/lsp.lua index 8a92179..b804fb3 100644 --- a/files/.config/nvim/lua/plugins/lsp.lua +++ b/files/.config/nvim/lua/plugins/lsp.lua @@ -19,11 +19,11 @@ end local function _1_(...) local ok_3f_0_, val_0_ = nil, nil local function _1_() - return {require("aniseed.core"), require("compe"), require("aniseed.fennel"), require("lspconfig"), require("lspconfig.configs"), require("lsp_signature"), require("aniseed.nvim"), require("lspsaga"), require("symbols-outline"), require("utils")} + return {require("aniseed.core"), require("compe"), require("aniseed.fennel"), require("lspconfig"), require("lspconfig.configs"), require("lsp_signature"), require("aniseed.nvim"), require("lspsaga"), require("symbols-outline"), require("trouble"), require("utils")} end ok_3f_0_, val_0_ = pcall(_1_) if ok_3f_0_ then - _0_0["aniseed/local-fns"] = {["require-macros"] = {macros = true}, require = {["lsp-configs"] = "lspconfig.configs", ["symbols-outline"] = "symbols-outline", a = "aniseed.core", compe = "compe", fennel = "aniseed.fennel", lsp = "lspconfig", lsp_signature = "lsp_signature", nvim = "aniseed.nvim", saga = "lspsaga", utils = "utils"}} + _0_0["aniseed/local-fns"] = {["require-macros"] = {macros = true}, require = {["lsp-configs"] = "lspconfig.configs", ["symbols-outline"] = "symbols-outline", a = "aniseed.core", compe = "compe", fennel = "aniseed.fennel", lsp = "lspconfig", lsp_signature = "lsp_signature", nvim = "aniseed.nvim", saga = "lspsaga", trouble = "trouble", utils = "utils"}} return val_0_ else return print(val_0_) @@ -31,7 +31,8 @@ local function _1_(...) end local _local_0_ = _1_(...) local a = _local_0_[1] -local utils = _local_0_[10] +local trouble = _local_0_[10] +local utils = _local_0_[11] local compe = _local_0_[2] local fennel = _local_0_[3] local lsp = _local_0_[4] @@ -43,6 +44,7 @@ local symbols_outline = _local_0_[9] local _2amodule_2a = _0_0 local _2amodule_name_2a = "plugins.lsp" do local _ = ({nil, _0_0, {{nil}, nil, nil, nil}})[2] end +local colors = utils.colors() local function on_attach(client, bufnr) lsp_signature.on_attach() if client.resolved_capabilities.document_highlight then @@ -84,11 +86,18 @@ init_lsp("cssls") symbols_outline.setup({highlight_hovered_item = true, show_guides = true}) compe.setup({autocomplete = false, debug = false, documentation = true, enabled = true, incomplete_delay = 400, max_abbr_width = 100, max_kind_width = 100, max_menu_width = 100, min_length = 1, preselect = "enable", source = {buffer = true, calc = true, nvim_lsp = true, nvim_lua = true, path = true, vsnip = false}, source_timeout = 200, throttle_time = 80}) saga.init_lsp_saga({border_style = 1, code_action_keys = {exec = "", quit = ""}, finder_action_keys = {open = "", quit = "", scroll_down = "", scroll_up = "", split = "b", vsplit = "v"}, rename_action_keys = {exec = "", quit = ""}}) -utils.highlight("LspSagaCodeActionTitle", {fg = "#8ec07c"}) -utils.highlight("LspSagaBorderTitle", {fg = "#8ec07c"}) -utils.highlight("LspSagaCodeActionContent", {fg = "#8ec07c"}) -utils.highlight("LspSagaFinderSelection", {fg = "#8ec07c"}) -utils.highlight("LspSagaDiagnosticHeader", {fg = "#8ec07c"}) -utils.highlight("TargetWord", {fg = "#8ec07c"}) +utils.highlight("LspSagaCodeActionTitle", {fg = colors.bright_aqua}) +utils.highlight("LspSagaBorderTitle", {fg = colors.bright_aqua}) +utils.highlight("LspSagaCodeActionContent", {fg = colors.bright_aqua}) +utils.highlight("LspSagaFinderSelection", {fg = colors.bright_aqua}) +utils.highlight("LspSagaDiagnosticHeader", {fg = colors.bright_aqua}) +utils.highlight("TargetWord", {fg = colors.bright_aqua}) +utils.highlight("LspTroubleFoldIcon", {bg = "NONE", fg = colors.bright_orange}) +utils.highlight("LspTroubleCount", {bg = "NONE", fg = colors.bright_green}) +utils.highlight("LspTroubleText", {bg = "NONE", fg = colors.light0}) +utils.highlight("LspTroubleSignError", {bg = "NONE", fg = colors.bright_red}) +utils.highlight("LspTroubleSignWarning", {bg = "NONE", fg = colors.bright_yellow}) +utils.highlight("LspTroubleSignInformation", {bg = "NONE", fg = colors.bright_aqua}) +utils.highlight("LspTroubleSignHint", {bg = "NONE", fg = colors.bright_blue}) vim.o.signcolumn = "yes" -return nil \ No newline at end of file +return trouble.setup({auto_close = true, auto_open = false, auto_preview = true, icons = false}) \ No newline at end of file diff --git a/files/.config/nvim/plugin/packer_compiled.vim b/files/.config/nvim/plugin/packer_compiled.vim index 3cae099..9b2b73a 100644 --- a/files/.config/nvim/plugin/packer_compiled.vim +++ b/files/.config/nvim/plugin/packer_compiled.vim @@ -109,6 +109,10 @@ _G.packer_plugins = { loaded = true, path = "/home/leon/.local/share/nvim/site/pack/packer/start/haskell-vim" }, + ["lsp-trouble.nvim"] = { + loaded = true, + path = "/home/leon/.local/share/nvim/site/pack/packer/start/lsp-trouble.nvim" + }, ["lsp_signature.nvim"] = { loaded = true, path = "/home/leon/.local/share/nvim/site/pack/packer/start/lsp_signature.nvim" @@ -302,10 +306,6 @@ _G.packer_plugins = { loaded = true, path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-visual-multi" }, - ["vim-which-key"] = { - loaded = true, - path = "/home/leon/.local/share/nvim/site/pack/packer/start/vim-which-key" - }, ["webapi-vim"] = { loaded = true, path = "/home/leon/.local/share/nvim/site/pack/packer/start/webapi-vim" diff --git a/files/.config/nvim/plugins.lua b/files/.config/nvim/plugins.lua index 8d6ed15..5c33cc0 100644 --- a/files/.config/nvim/plugins.lua +++ b/files/.config/nvim/plugins.lua @@ -19,6 +19,8 @@ require("packer").startup(function(use) use "folke/which-key.nvim" + use "folke/lsp-trouble.nvim" + -- better quickfix window use "kevinhwang91/nvim-bqf"