add more stuff

This commit is contained in:
elkowar 2021-04-24 11:48:47 +02:00
parent cf8f859174
commit 8ccc48b440
6 changed files with 33 additions and 22 deletions

View file

@ -40,8 +40,9 @@
"d" [ ":Lspsaga hover_doc" "show documentation"]
"b" [ ":Lspsaga lsp_finder" "find stuff"]
"x" [ ":Lspsaga preview_definition" "Preview definition"]
"o" [ ":Telescope lsp_document_symbols" "symbols in document"]
"s" [ ":Telescope lsp_workspace_symbols" "symbols in workspace"]
"o" [ ":SymbolsOutline" "Outline"]
"S" [ ":Telescope lsp_document_symbols" "symbols in document"]
"s" [ ":Telescope lsp_dynamic_workspace_symbols" "symbols in workspace"]
"t" [ ":Lspsaga signature_help" "Show signature help"]
"n" [ ":Lspsaga rename" "rename"]
"v" [ ":Lspsaga code_action" "apply codeaction"]
@ -51,7 +52,6 @@
"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"]
;"r" [ (le "vim.lsp.buf.references()") "show references"]
"r" [ ":Telescope lsp_references" "show references"]
"f" [ (le "vim.lsp.buf.formatting()") "format file"]}

View file

@ -7,7 +7,8 @@
saga lspsaga
utils utils
compe compe
lsp_signature lsp_signature}
lsp_signature lsp_signature
symbols-outline symbols-outline}
require-macros [macros]})
(fn on_attach [client bufnr]
@ -60,6 +61,8 @@
;(lsp.vimls.setup { :on_attach on_attach})
(symbols-outline.setup { :highlight_hovered_item true :show_guides true})
(compe.setup
{ :enabled true

View file

@ -46,6 +46,6 @@ local function le(s)
end
nvim.g.which_key_map = {}
nvim.command("call which_key#register('<Space>', \"g:which_key_map\")")
nvim.g.which_key_map = {[":"] = {":Commands", "Search command with fzf"}, ["["] = {"<Plug>(YoinkPostPasteSwapBack)", "Swap last paste backwards"}, ["]"] = {"<Plug>(YoinkPostPasteSwapForward)", "Swap last paste backwards"}, b = {b = {":Buffers", "select open buffer"}, c = {":bdelete!", "close open buffer"}, name = "+buffers", w = {":bwipeout!", "wipeout open buffer"}}, c = {name = "+comment_out"}, e = {name = "+emmet"}, f = {j = {"zj", "jump to next fold"}, k = {"zk", "jump to previous fold"}, n = {":foldclose", "close fold"}, name = "+folds", o = {":foldopen", "open fold"}}, h = {":bprevious", "previous buffer"}, l = {":bnext", "next buffer"}, m = {A = {":Lspsaga show_line_diagnostics", "Line diagnostics"}, E = {":Telescope lsp_workspace_diagnostics", "List diagnostics"}, a = {":Lspsaga show_cursor_diagnostics", "Cursor diagnostics"}, b = {":Lspsaga lsp_finder", "find stuff"}, d = {":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 = {":Lspsaga rename", "rename"}, name = "+Code-actions", o = {":Telescope lsp_document_symbols", "symbols in document"}, r = {":Telescope lsp_references", "show references"}, s = {":Telescope lsp_workspace_symbols", "symbols in workspace"}, t = {":Lspsaga signature_help", "Show signature help"}, v = {":Lspsaga code_action", "apply codeaction"}, x = {":Lspsaga preview_definition", "Preview definition"}}, o = {":Telescope live_grep", "Grep files"}, p = {":Telescope file_browser", "Open file-browser"}, s = "which_key_ignore", v = {g = {":Goyo | set linebreak", "toggle focus mode"}, i = {":IndentGuidesToggle", "toggle indent guides"}, m = {":set nonumber! norelativenumber", "toggle numbers"}, n = {":set relativenumber!", "toggle relative numbers"}, name = "+view-and-layout"}, z = {c = {"foldclose", "close fold"}, name = "+folds", o = {"foldopen", "open fold"}}}
nvim.g.which_key_map = {[":"] = {":Commands", "Search command with fzf"}, ["["] = {"<Plug>(YoinkPostPasteSwapBack)", "Swap last paste backwards"}, ["]"] = {"<Plug>(YoinkPostPasteSwapForward)", "Swap last paste backwards"}, b = {b = {":Buffers", "select open buffer"}, c = {":bdelete!", "close open buffer"}, name = "+buffers", w = {":bwipeout!", "wipeout open buffer"}}, c = {name = "+comment_out"}, e = {name = "+emmet"}, f = {j = {"zj", "jump to next fold"}, k = {"zk", "jump to previous fold"}, n = {":foldclose", "close fold"}, name = "+folds", o = {":foldopen", "open fold"}}, h = {":bprevious", "previous buffer"}, l = {":bnext", "next buffer"}, m = {A = {":Lspsaga show_line_diagnostics", "Line diagnostics"}, E = {":Telescope lsp_workspace_diagnostics", "List diagnostics"}, S = {":Telescope lsp_document_symbols", "symbols in document"}, a = {":Lspsaga show_cursor_diagnostics", "Cursor diagnostics"}, b = {":Lspsaga lsp_finder", "find stuff"}, d = {":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 = {":Lspsaga rename", "rename"}, name = "+Code-actions", o = {":SymbolsOutline", "Outline"}, r = {":Telescope lsp_references", "show references"}, s = {":Telescope lsp_dynamic_workspace_symbols", "symbols in workspace"}, t = {":Lspsaga signature_help", "Show signature help"}, v = {":Lspsaga code_action", "apply codeaction"}, x = {":Lspsaga preview_definition", "Preview definition"}}, o = {":Telescope live_grep", "Grep files"}, p = {":Telescope file_browser", "Open file-browser"}, s = "which_key_ignore", v = {g = {":Goyo | set linebreak", "toggle focus mode"}, i = {":IndentGuidesToggle", "toggle indent guides"}, m = {":set nonumber! norelativenumber", "toggle numbers"}, n = {":set relativenumber!", "toggle relative numbers"}, name = "+view-and-layout"}, z = {c = {"foldclose", "close fold"}, name = "+folds", o = {"foldopen", "open fold"}}}
nvim.o.timeoutlen = 200
return nvim.command("autocmd! VimEnter * :unmap <space>ig\n autocmd! FileType which_key")

View file

@ -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("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("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", 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", utils = "utils"}}
return val_0_
else
return print(val_0_)
@ -31,6 +31,7 @@ local function _1_(...)
end
local _local_0_ = _1_(...)
local a = _local_0_[1]
local utils = _local_0_[10]
local compe = _local_0_[2]
local fennel = _local_0_[3]
local lsp = _local_0_[4]
@ -38,7 +39,7 @@ local lsp_configs = _local_0_[5]
local lsp_signature = _local_0_[6]
local nvim = _local_0_[7]
local saga = _local_0_[8]
local utils = _local_0_[9]
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
@ -80,6 +81,7 @@ init_lsp("erlangls")
init_lsp("yamlls")
init_lsp("html")
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 = "<CR>", quit = "<esc>"}, finder_action_keys = {open = "<CR>", quit = "<esc>", scroll_down = "<C-d>", scroll_up = "<C-u>", split = "b", vsplit = "v"}, rename_action_keys = {exec = "<CR>", quit = "<esc>"}})
utils.highlight("LspSagaCodeActionTitle", {fg = "#8ec07c"})

View file

@ -194,6 +194,10 @@ _G.packer_plugins = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/startuptime.vim"
},
["symbols-outline.nvim"] = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/symbols-outline.nvim"
},
tabular = {
loaded = true,
path = "/home/leon/.local/share/nvim/site/pack/packer/start/tabular"

View file

@ -15,6 +15,8 @@ require("packer").startup(function(use)
use_rocks "rtsisyk/fun"
use "simrat39/symbols-outline.nvim"
-- better quickfix window
use "kevinhwang91/nvim-bqf"