mirror of
https://github.com/halfdan/dotfiles.git
synced 2025-04-26 20:35:40 +00:00
convert fully to LSP for all the things
This commit is contained in:
parent
31c617f1e4
commit
5dd8ae6223
@ -6,23 +6,21 @@ require('plugins')
|
|||||||
require('colorscheme')
|
require('colorscheme')
|
||||||
|
|
||||||
require('lsp')
|
require('lsp')
|
||||||
require('lsp.docker-ls')
|
--require('lsp.docker-ls')
|
||||||
require('lsp.python-ls')
|
--require('lsp.python-ls')
|
||||||
require('lsp.julia-ls')
|
--require('lsp.julia-ls')
|
||||||
require('lsp.json-ls')
|
--require('lsp.json-ls')
|
||||||
require('lsp.elixir-ls')
|
--require('lsp.elixir-ls')
|
||||||
require('lsp.go-ls')
|
--require('lsp.go-ls')
|
||||||
require('lsp.terraform-ls')
|
--require('lsp.terraform-ls')
|
||||||
|
|
||||||
require('plugins.telescope')
|
require('plugins.telescope')
|
||||||
require('plugins.telescope-project')
|
require('plugins.telescope-project')
|
||||||
require('plugins.treesitter')
|
require('plugins.treesitter')
|
||||||
require('plugins.cmp')
|
require('plugins.cmp')
|
||||||
require('plugins.which-key')
|
|
||||||
require('plugins.lualine')
|
require('plugins.lualine')
|
||||||
require('plugins.tagbar')
|
require('plugins.tagbar')
|
||||||
require('plugins.sneak')
|
require('plugins.sneak')
|
||||||
|
|
||||||
require('themes.nord')
|
require('themes.nord')
|
||||||
|
|
||||||
require('go').setup()
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
vim.cmd('let g:nvcode_termcolors=256')
|
vim.cmd('let g:nvcode_termcolors=256')
|
||||||
|
|
||||||
vim.cmd('colorscheme ' .. O.colorscheme)
|
vim.cmd('colorscheme ' .. O.colorscheme)
|
||||||
|
|
||||||
|
vim.cmd('highlight Normal guibg=NONE ctermbg=NONE')
|
||||||
|
@ -20,50 +20,6 @@ O = {
|
|||||||
splitbelow = true,
|
splitbelow = true,
|
||||||
|
|
||||||
database = {save_location = '~/.config/nvcode_db', auto_execute = 1},
|
database = {save_location = '~/.config/nvcode_db', auto_execute = 1},
|
||||||
python = {
|
|
||||||
linter = 'flake8',
|
|
||||||
-- @usage can be 'yapf', 'black'
|
|
||||||
formatter = 'black',
|
|
||||||
autoformat = false,
|
|
||||||
isort = false,
|
|
||||||
diagnostics = {virtual_text = {spacing = 0, prefix = ""}, signs = true, underline = true},
|
|
||||||
analysis = {type_checking = "basic", auto_search_paths = true, use_library_code_types = true}
|
|
||||||
},
|
|
||||||
lua = {
|
|
||||||
-- @usage can be 'lua-format'
|
|
||||||
formatter = '',
|
|
||||||
autoformat = false,
|
|
||||||
diagnostics = {virtual_text = {spacing = 0, prefix = ""}, signs = true, underline = true}
|
|
||||||
},
|
|
||||||
sh = {
|
|
||||||
-- @usage can be 'shellcheck'
|
|
||||||
linter = '',
|
|
||||||
-- @usage can be 'shfmt'
|
|
||||||
formatter = '',
|
|
||||||
autoformat = false,
|
|
||||||
diagnostics = {virtual_text = {spacing = 0, prefix = ""}, signs = true, underline = true}
|
|
||||||
},
|
|
||||||
tsserver = {
|
|
||||||
-- @usage can be 'eslint'
|
|
||||||
linter = '',
|
|
||||||
-- @usage can be 'prettier'
|
|
||||||
formatter = '',
|
|
||||||
autoformat = false,
|
|
||||||
diagnostics = {virtual_text = {spacing = 0, prefix = ""}, signs = true, underline = true}
|
|
||||||
},
|
|
||||||
json = {
|
|
||||||
-- @usage can be 'prettier'
|
|
||||||
formatter = '',
|
|
||||||
autoformat = false,
|
|
||||||
diagnostics = {virtual_text = {spacing = 0, prefix = ""}, signs = true, underline = true}
|
|
||||||
},
|
|
||||||
clang = {diagnostics = {virtual_text = {spacing = 0, prefix = ""}, signs = true, underline = true}},
|
|
||||||
ruby = {
|
|
||||||
diagnostics = {virtualtext = {spacing = 0, prefix = ""}, signs = true, underline = true},
|
|
||||||
filetypes = {'rb', 'erb', 'rakefile'}
|
|
||||||
},
|
|
||||||
-- css = {formatter = '', autoformat = false, virtual_text = true},
|
|
||||||
-- json = {formatter = '', autoformat = false, virtual_text = true}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DATA_PATH = vim.fn.stdpath('data')
|
DATA_PATH = vim.fn.stdpath('data')
|
||||||
|
@ -1,29 +1,11 @@
|
|||||||
vim.g.mapleader = ' '
|
vim.g.mapleader = ' '
|
||||||
|
|
||||||
-- TODO find better place
|
|
||||||
vim.g.floaterm_open_command = 'vsplit'
|
|
||||||
--vim.g.floaterm_position = 'bottom'
|
|
||||||
|
|
||||||
-- better window movement
|
-- better window movement
|
||||||
vim.api.nvim_set_keymap('n', '<C-h>', '<C-w>h', {silent = true})
|
vim.api.nvim_set_keymap('n', '<C-h>', '<C-w>h', {silent = true})
|
||||||
vim.api.nvim_set_keymap('n', '<C-j>', '<C-w>j', {silent = true})
|
vim.api.nvim_set_keymap('n', '<C-j>', '<C-w>j', {silent = true})
|
||||||
vim.api.nvim_set_keymap('n', '<C-k>', '<C-w>k', {silent = true})
|
vim.api.nvim_set_keymap('n', '<C-k>', '<C-w>k', {silent = true})
|
||||||
vim.api.nvim_set_keymap('n', '<C-l>', '<C-w>l', {silent = true})
|
vim.api.nvim_set_keymap('n', '<C-l>', '<C-w>l', {silent = true})
|
||||||
|
|
||||||
-- TODO fix this
|
|
||||||
-- Terminal window navigation
|
|
||||||
--vim.cmd([[
|
|
||||||
--tnoremap <C-h> <C-\><C-N><C-w>h
|
|
||||||
--tnoremap <C-j> <C-\><C-N><C-w>j
|
|
||||||
--tnoremap <C-k> <C-\><C-N><C-w>k
|
|
||||||
--tnoremap <C-l> <C-\><C-N><C-w>l
|
|
||||||
--inoremap <C-h> <C-\><C-N><C-w>h
|
|
||||||
--inoremap <C-j> <C-\><C-N><C-w>j
|
|
||||||
--inoremap <C-k> <C-\><C-N><C-w>k
|
|
||||||
--inoremap <C-l> <C-\><C-N><C-w>l
|
|
||||||
--tnoremap <Esc> <C-\><C-n>
|
|
||||||
--]])
|
|
||||||
|
|
||||||
-- resize with arrows
|
-- resize with arrows
|
||||||
vim.api.nvim_set_keymap('n', '<C-Up>', ':resize -2<CR>', {silent = true})
|
vim.api.nvim_set_keymap('n', '<C-Up>', ':resize -2<CR>', {silent = true})
|
||||||
vim.api.nvim_set_keymap('n', '<C-Down>', ':resize +2<CR>', {silent = true})
|
vim.api.nvim_set_keymap('n', '<C-Down>', ':resize +2<CR>', {silent = true})
|
||||||
@ -31,22 +13,18 @@ vim.api.nvim_set_keymap('n', '<C-Left>', ':vertical resize -2<CR>', {silent = tr
|
|||||||
vim.api.nvim_set_keymap('n', '<C-Right>', ':vertical resize +2<CR>', {silent = true})
|
vim.api.nvim_set_keymap('n', '<C-Right>', ':vertical resize +2<CR>', {silent = true})
|
||||||
|
|
||||||
-- improved keyboard support for navigation (especially terminal)
|
-- improved keyboard support for navigation (especially terminal)
|
||||||
vim.cmd([[
|
vim.api.nvim_set_keymap('n', '<leader>h', '<C-w>h', {noremap = true})
|
||||||
nnoremap <leader>h <C-w>h
|
vim.api.nvim_set_keymap('n', '<leader>j', '<C-w>j', {noremap = true})
|
||||||
nnoremap <leader>j <C-w>j
|
vim.api.nvim_set_keymap('n', '<leader>k', '<C-w>k', {noremap = true})
|
||||||
nnoremap <leader>k <C-w>k
|
vim.api.nvim_set_keymap('n', '<leader>l', '<C-w>l', {noremap = true})
|
||||||
nnoremap <leader>l <C-w>l
|
vim.api.nvim_set_keymap('n', '<A-h>', '<C-w>h', {noremap = true})
|
||||||
nnoremap <A-h> <C-w>h
|
vim.api.nvim_set_keymap('n', '<A-j>', '<C-w>j', {noremap = true})
|
||||||
nnoremap <A-j> <C-w>j
|
vim.api.nvim_set_keymap('n', '<A-k>', '<C-w>k', {noremap = true})
|
||||||
nnoremap <A-k> <C-w>k
|
vim.api.nvim_set_keymap('n', '<A-l>', '<C-w>l', {noremap = true})
|
||||||
nnoremap <A-l> <C-w>l
|
|
||||||
]])
|
|
||||||
|
|
||||||
-- Change 2 split windows from vert to horiz or horiz to vert
|
-- Change 2 split windows from vert to horiz or horiz to vert
|
||||||
vim.cmd([[
|
vim.api.nvim_set_keymap('n', '<leader>th', '<C-w>t<C-w>H', {noremap = true})
|
||||||
map <leader>th <C-w>t<C-w>H
|
vim.api.nvim_set_keymap('n', '<leader>tk', '<C-w>t<C-w>K', {noremap = true})
|
||||||
map <leader>tk <C-w>t<C-w>K
|
|
||||||
]])
|
|
||||||
|
|
||||||
-- Make adjusting split sizes a bit more friendly
|
-- Make adjusting split sizes a bit more friendly
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
@ -56,32 +34,6 @@ vim.cmd([[
|
|||||||
noremap <silent> <C-Down> :resize -3<CR>
|
noremap <silent> <C-Down> :resize -3<CR>
|
||||||
]])
|
]])
|
||||||
|
|
||||||
-- FloatTerm
|
|
||||||
vim.cmd([[
|
|
||||||
nnoremap <silent> <F9> :FloatermNew --height=0.4 --width=0.98 --wintype=floating --position=bottom --autoclose=2 --title=
|
|
||||||
tnoremap <silent> <F9> <C-\><C-n>:FloatermNew --height=0.4 --width=0.98 --wintype=floating --position=bottom --autoclose=2 --title=
|
|
||||||
nnoremap <silent> <F8> :FloatermPrev<CR>
|
|
||||||
tnoremap <silent> <F8> <C-\><C-n>:FloatermPrev<CR>
|
|
||||||
nnoremap <silent> <F10> :FloatermNext<CR>
|
|
||||||
tnoremap <silent> <F10> <C-\><C-n>:FloatermNext<CR>
|
|
||||||
inoremap <silent> <F11> <C-c>:FloatermToggle<CR>
|
|
||||||
nnoremap <silent> <F11> :FloatermToggle<CR>
|
|
||||||
tnoremap <silent> <F11> <C-\><C-n>:FloatermToggle<CR>
|
|
||||||
tnoremap <silent> <M-o> <C-\><C-n><CR>
|
|
||||||
nnoremap <C-c><C-c> :FloatermSend<CR>
|
|
||||||
vnoremap <C-c><C-c> :FloatermSend<CR>
|
|
||||||
]])
|
|
||||||
|
|
||||||
-- -- Compe
|
|
||||||
-- vim.cmd([[
|
|
||||||
-- inoremap <silent><expr> <C-Space> compe#complete()
|
|
||||||
-- inoremap <silent><expr> <CR> compe#confirm('<CR>')
|
|
||||||
-- inoremap <silent><expr> <C-e> compe#close('<C-e>')
|
|
||||||
-- inoremap <silent><expr> <C-f> compe#scroll({ 'delta': +4 })
|
|
||||||
-- inoremap <silent><expr> <C-d> compe#scroll({ 'delta': -4 })
|
|
||||||
-- ]])
|
|
||||||
|
|
||||||
|
|
||||||
-- better indenting
|
-- better indenting
|
||||||
vim.api.nvim_set_keymap('v', '<', '<gv', {noremap = true, silent = true})
|
vim.api.nvim_set_keymap('v', '<', '<gv', {noremap = true, silent = true})
|
||||||
vim.api.nvim_set_keymap('v', '>', '>gv', {noremap = true, silent = true})
|
vim.api.nvim_set_keymap('v', '>', '>gv', {noremap = true, silent = true})
|
||||||
@ -91,6 +43,7 @@ vim.api.nvim_set_keymap('i', 'jk', '<ESC>', {noremap = true, silent = true})
|
|||||||
vim.api.nvim_set_keymap('i', 'kj', '<ESC>', {noremap = true, silent = true})
|
vim.api.nvim_set_keymap('i', 'kj', '<ESC>', {noremap = true, silent = true})
|
||||||
vim.api.nvim_set_keymap('i', 'jj', '<ESC>', {noremap = true, silent = true})
|
vim.api.nvim_set_keymap('i', 'jj', '<ESC>', {noremap = true, silent = true})
|
||||||
|
|
||||||
|
|
||||||
-- Tab switch buffer
|
-- Tab switch buffer
|
||||||
vim.api.nvim_set_keymap('n', '<TAB>', ':bnext<CR>', {noremap = true, silent = true})
|
vim.api.nvim_set_keymap('n', '<TAB>', ':bnext<CR>', {noremap = true, silent = true})
|
||||||
vim.api.nvim_set_keymap('n', '<S-TAB>', ':bprevious<CR>', {noremap = true, silent = true})
|
vim.api.nvim_set_keymap('n', '<S-TAB>', ':bprevious<CR>', {noremap = true, silent = true})
|
||||||
@ -100,3 +53,35 @@ vim.api.nvim_set_keymap('x', 'K', ':move \'<-2<CR>gv-gv', {noremap = true, silen
|
|||||||
vim.api.nvim_set_keymap('x', 'J', ':move \'>+1<CR>gv-gv', {noremap = true, silent = true})
|
vim.api.nvim_set_keymap('x', 'J', ':move \'>+1<CR>gv-gv', {noremap = true, silent = true})
|
||||||
|
|
||||||
vim.api.nvim_set_keymap('n', 'Q', '<Nop>', {noremap = true, silent = true})
|
vim.api.nvim_set_keymap('n', 'Q', '<Nop>', {noremap = true, silent = true})
|
||||||
|
|
||||||
|
-- Telescope
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>ps', ':lua require(\'telescope.builtin\').grep_string({ search = vim.fn.input("Grep For > ")})<CR>', {noremap = true})
|
||||||
|
vim.api.nvim_set_keymap('n', '<C-p>', ':lua require(\'telescope.builtin\').git_files()<CR>', {noremap = true})
|
||||||
|
vim.api.nvim_set_keymap('n', '<Leader>pf', ':lua require(\'telescope.builtin\').find_files()<CR>', {noremap = true})
|
||||||
|
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>pw', ':lua require(\'telescope.builtin\').grep_string { search = vim.fn.expand("<cword>") }<CR>', {noremap = true})
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>pb', ':lua require(\'telescope.builtin\').buffers()<CR>', {noremap = true})
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>vh', ':lua require(\'telescope.builtin\').help_tags()<CR>', {noremap = true})
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>gw', ':lua require(\'telescope\').extensions.git_worktree.git_worktrees()<CR>', {noremap = true})
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>gm', ':lua require(\'telescope\').extensions.git_worktree.create_git_worktree()<CR>', {noremap = true})
|
||||||
|
|
||||||
|
-- Tagbar
|
||||||
|
vim.api.nvim_set_keymap('n', '<Leader>tt', ':SymbolsOutline<CR>', {noremap = true})
|
||||||
|
vim.api.nvim_set_keymap('n', '<Leader>hl', ':nohl<CR>', {noremap = true})
|
||||||
|
|
||||||
|
-- LSP
|
||||||
|
vim.cmd("nnoremap <silent> gd <cmd>lua vim.lsp.buf.definition()<CR>")
|
||||||
|
vim.cmd("nnoremap <silent> gD <cmd>lua vim.lsp.buf.declaration()<CR>")
|
||||||
|
vim.cmd("nnoremap <silent> gr <cmd>lua vim.lsp.buf.references()<CR>")
|
||||||
|
vim.cmd("nnoremap <silent> gi <cmd>lua vim.lsp.buf.implementation()<CR>")
|
||||||
|
vim.cmd("nnoremap <silent> ca :Lspsaga code_action<CR>")
|
||||||
|
vim.cmd("nnoremap <silent> K :Lspsaga hover_doc<CR>")
|
||||||
|
vim.cmd('nnoremap <silent> <C-k> <cmd>lua vim.lsp.buf.signature_help()<CR>')
|
||||||
|
vim.cmd("nnoremap <silent> <C-p> :Lspsaga diagnostic_jump_prev<CR>")
|
||||||
|
vim.cmd("nnoremap <silent> <C-n> :Lspsaga diagnostic_jump_next<CR>")
|
||||||
|
-- -- scroll down hover doc or scroll in definition preview
|
||||||
|
vim.cmd("nnoremap <silent> <C-f> <cmd>lua require('lspsaga.action').smart_scroll_with_saga(1)<CR>")
|
||||||
|
-- -- scroll up hover doc
|
||||||
|
vim.cmd("nnoremap <silent> <C-b> <cmd>lua require('lspsaga.action').smart_scroll_with_saga(-1)<CR>")
|
||||||
|
vim.cmd('command! -nargs=0 LspVirtualTextToggle lua require("lsp/virtual_text").toggle()')
|
||||||
|
|
||||||
|
@ -16,21 +16,6 @@ vim.fn.sign_define(
|
|||||||
{texthl = "LspDiagnosticsSignInformation", text = "", numhl = "LspDiagnosticsSignInformation"}
|
{texthl = "LspDiagnosticsSignInformation", text = "", numhl = "LspDiagnosticsSignInformation"}
|
||||||
)
|
)
|
||||||
|
|
||||||
vim.cmd("nnoremap <silent> gd <cmd>lua vim.lsp.buf.definition()<CR>")
|
|
||||||
vim.cmd("nnoremap <silent> gD <cmd>lua vim.lsp.buf.declaration()<CR>")
|
|
||||||
vim.cmd("nnoremap <silent> gr <cmd>lua vim.lsp.buf.references()<CR>")
|
|
||||||
vim.cmd("nnoremap <silent> gi <cmd>lua vim.lsp.buf.implementation()<CR>")
|
|
||||||
vim.cmd("nnoremap <silent> ca :Lspsaga code_action<CR>")
|
|
||||||
vim.cmd("nnoremap <silent> K :Lspsaga hover_doc<CR>")
|
|
||||||
vim.cmd('nnoremap <silent> <C-k> <cmd>lua vim.lsp.buf.signature_help()<CR>')
|
|
||||||
vim.cmd("nnoremap <silent> <C-p> :Lspsaga diagnostic_jump_prev<CR>")
|
|
||||||
vim.cmd("nnoremap <silent> <C-n> :Lspsaga diagnostic_jump_next<CR>")
|
|
||||||
-- -- scroll down hover doc or scroll in definition preview
|
|
||||||
vim.cmd("nnoremap <silent> <C-f> <cmd>ua require('lspsaga.action').smart_scroll_with_saga(1)<CR>")
|
|
||||||
-- -- scroll up hover doc
|
|
||||||
vim.cmd("nnoremap <silent> <C-b> <cmd>lua require('lspsaga.action').smart_scroll_with_saga(-1)<CR>")
|
|
||||||
vim.cmd('command! -nargs=0 LspVirtualTextToggle lua require("lsp/virtual_text").toggle()')
|
|
||||||
|
|
||||||
-- Set Default Prefix.
|
-- Set Default Prefix.
|
||||||
-- Note: You can set a prefix per lsp server in the lv-globals.lua file
|
-- Note: You can set a prefix per lsp server in the lv-globals.lua file
|
||||||
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
|
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
|
||||||
@ -73,8 +58,6 @@ vim.lsp.protocol.CompletionItemKind = {
|
|||||||
" (TypeParameter)"
|
" (TypeParameter)"
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.cmd("autocmd BufWritePre *.go :silent! lua require('go.format').gofmt()")
|
|
||||||
|
|
||||||
local function documentHighlight(client, bufnr)
|
local function documentHighlight(client, bufnr)
|
||||||
-- Set autocommands conditional on server_capabilities
|
-- Set autocommands conditional on server_capabilities
|
||||||
if client.resolved_capabilities.document_highlight then
|
if client.resolved_capabilities.document_highlight then
|
||||||
@ -93,19 +76,50 @@ local function documentHighlight(client, bufnr)
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local lsp_config = {}
|
|
||||||
|
|
||||||
function lsp_config.common_on_attach(client, bufnr)
|
require'lspconfig'.elixirls.setup{}
|
||||||
documentHighlight(client, bufnr)
|
|
||||||
end
|
|
||||||
|
|
||||||
function lsp_config.tsserver_on_attach(client, bufnr)
|
-- needed for the LSP to recognize elixir files (alternativly just use elixir-editors/vim-elixir)
|
||||||
lsp_config.common_on_attach(client, bufnr)
|
vim.cmd([[
|
||||||
client.resolved_capabilities.document_formatting = false
|
au BufRead,BufNewFile *.ex,*.exs set filetype=elixir
|
||||||
end
|
au BufRead,BufNewFile *.eex,*.leex,*.sface set filetype=eelixir
|
||||||
|
au BufRead,BufNewFile mix.lock set filetype=elixir
|
||||||
|
]])
|
||||||
|
|
||||||
|
require("lspconfig").gopls.setup({
|
||||||
|
cmd = { "gopls", "serve" },
|
||||||
|
settings = {
|
||||||
|
gopls = {
|
||||||
|
analyses = {
|
||||||
|
unusedparams = true,
|
||||||
|
},
|
||||||
|
staticcheck = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
require'lspconfig'.julials.setup{}
|
||||||
|
|
||||||
|
require'lspconfig'.pyright.setup{}
|
||||||
|
|
||||||
|
require("lspconfig").rust_analyzer.setup({
|
||||||
|
cmd = { "rustup", "run", "nightly", "rust-analyzer"},
|
||||||
|
--[[
|
||||||
|
settings = {
|
||||||
|
rust = {
|
||||||
|
unstable_features = true,
|
||||||
|
build_on_save = false,
|
||||||
|
all_features = true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
--]]
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.g.symbols_outline = {
|
||||||
|
auto_close = true,
|
||||||
|
highlight_hovered_item = true,
|
||||||
|
show_guides = true,
|
||||||
|
relative_width = true,
|
||||||
|
width = 25,
|
||||||
|
}
|
||||||
|
|
||||||
-- Use a loop to conveniently both setup defined servers
|
|
||||||
-- and map buffer local keybindings when the language server attaches
|
|
||||||
-- local servers = {"pyright", "tsserver"}
|
|
||||||
-- for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup {on_attach = on_attach} end
|
|
||||||
return lsp_config
|
|
@ -1,6 +0,0 @@
|
|||||||
-- npm install -g dockerfile-language-server-nodejs
|
|
||||||
require'lspconfig'.dockerls.setup {
|
|
||||||
cmd = {DATA_PATH .. "/lspinstall/dockerfile/node_modules/.bin/docker-langserver", "--stdio"},
|
|
||||||
on_attach = require'lsp'.common_on_attach,
|
|
||||||
root_dir = vim.loop.cwd
|
|
||||||
}
|
|
@ -1,10 +0,0 @@
|
|||||||
require'lspconfig'.elixirls.setup{
|
|
||||||
cmd = { DATA_PATH .. "/lspinstall/elixir/elixir-ls/language_server.sh"};
|
|
||||||
}
|
|
||||||
|
|
||||||
-- needed for the LSP to recognize elixir files (alternativly just use elixir-editors/vim-elixir)
|
|
||||||
vim.cmd([[
|
|
||||||
au BufRead,BufNewFile *.ex,*.exs set filetype=elixir
|
|
||||||
au BufRead,BufNewFile *.eex,*.leex,*.sface set filetype=eelixir
|
|
||||||
au BufRead,BufNewFile mix.lock set filetype=elixir
|
|
||||||
]])
|
|
@ -1,7 +0,0 @@
|
|||||||
require'lspconfig'.gopls.setup{
|
|
||||||
cmd = {DATA_PATH .. "/lsp_servers/go/gopls"},
|
|
||||||
settings = {gopls = {analyses = {unusedparams = true}, staticcheck = true}},
|
|
||||||
root_dir = require'lspconfig'.util.root_pattern(".git","go.mod","."),
|
|
||||||
init_options = {usePlaceholders = true, completeUnimported = true},
|
|
||||||
on_attach = require'lsp'.common_on_attach
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
-- npm install -g vscode-json-languageserver
|
|
||||||
require'lspconfig'.jsonls.setup {
|
|
||||||
cmd = {
|
|
||||||
"node", DATA_PATH .. "/lspinstall/json/vscode-json/json-language-features/server/dist/node/jsonServerMain.js",
|
|
||||||
"--stdio"
|
|
||||||
},
|
|
||||||
on_attach = require'lsp'.common_on_attach,
|
|
||||||
|
|
||||||
commands = {
|
|
||||||
Format = {
|
|
||||||
function()
|
|
||||||
vim.lsp.buf.range_formatting({}, {0, 0}, {vim.fn.line("$"), 0})
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
require'lspconfig'.julials.setup{
|
|
||||||
on_attach = require'lsp'.common_on_attach
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
-- npm i -g pyright
|
|
||||||
require'lspconfig'.pyright.setup {
|
|
||||||
cmd = {DATA_PATH .. "/lspinstall/python/node_modules/.bin/pyright-langserver", "--stdio"},
|
|
||||||
on_attach = require'lsp'.common_on_attach,
|
|
||||||
handlers = {
|
|
||||||
["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
|
||||||
virtual_text = O.python.diagnostics.virtual_text,
|
|
||||||
signs = O.python.diagnostics.signs,
|
|
||||||
underline = O.python.diagnostics.underline,
|
|
||||||
update_in_insert = true
|
|
||||||
})
|
|
||||||
},
|
|
||||||
settings = {
|
|
||||||
python = {
|
|
||||||
analysis = {
|
|
||||||
typeCheckingMode = O.python.analysis.type_checking,
|
|
||||||
autoSearchPaths = O.python.analysis.auto_search_paths,
|
|
||||||
useLibraryCodeForTypes = O.python.analysis.use_library_code_types
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
require'lspconfig'.terraformls.setup{
|
|
||||||
cmd = {DATA_PATH .. "/lspinstall/terraform/terraform-ls", "serve"},
|
|
||||||
on_attach = require'lsp'.common_on_attach
|
|
||||||
}
|
|
@ -68,61 +68,43 @@ return require("packer").startup(
|
|||||||
-- Easy commenting for Vim
|
-- Easy commenting for Vim
|
||||||
use {'preservim/nerdcommenter'}
|
use {'preservim/nerdcommenter'}
|
||||||
|
|
||||||
-- NERD Tree - tree explorer
|
|
||||||
-- https://github.com/scrooloose/nerdtree
|
|
||||||
-- http://usevim.com/2012/07/18/nerdtree/
|
|
||||||
-- (loaded on first invocation of the command)
|
|
||||||
use {
|
|
||||||
'preservim/nerdtree',
|
|
||||||
requires = {'ryanoasis/vim-devicons'}
|
|
||||||
}
|
|
||||||
|
|
||||||
-- nerdtree-git-plugin - show git status in NERD Tree
|
|
||||||
-- https://github.com/Xuyuanp/nerdtree-git-plugi
|
|
||||||
use {'Xuyuanp/nerdtree-git-plugin'}
|
|
||||||
|
|
||||||
|
|
||||||
-- LSP / Language Server Protocol
|
-- LSP / Language Server Protocol
|
||||||
use {
|
use {
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
'williamboman/nvim-lsp-installer',
|
'williamboman/nvim-lsp-installer',
|
||||||
}
|
}
|
||||||
--use {'hrsh7th/nvim-compe'}
|
|
||||||
|
|
||||||
use {'hrsh7th/cmp-nvim-lsp'}
|
use {'hrsh7th/cmp-nvim-lsp'}
|
||||||
use {'hrsh7th/cmp-buffer'}
|
use {'hrsh7th/cmp-buffer'}
|
||||||
use {'hrsh7th/cmp-path'}
|
use {'hrsh7th/cmp-path'}
|
||||||
use {'hrsh7th/cmp-cmdline'}
|
use {'hrsh7th/cmp-cmdline'}
|
||||||
use {'hrsh7th/nvim-cmp'}
|
use {'hrsh7th/nvim-cmp'}
|
||||||
|
use {'tzachar/cmp-tabnine', run = './install.sh'}
|
||||||
|
use {'onsails/lspkind-nvim'} -- Display symbol with cmp suggestions
|
||||||
|
|
||||||
-- use {'glepnir/lspsaga.nvim'} -- Has a bug
|
|
||||||
use {'tami5/lspsaga.nvim'}
|
use {'tami5/lspsaga.nvim'}
|
||||||
|
|
||||||
use {'nvim-lua/lsp-status.nvim'}
|
use {'nvim-lua/lsp-status.nvim'}
|
||||||
use {'simrat39/symbols-outline.nvim'}
|
|
||||||
|
|
||||||
-- Terminal in floating window
|
--use {'simrat39/symbols-outline.nvim'}
|
||||||
use {'voldikss/vim-floaterm'}
|
use {'marcuscaisey/symbols-outline.nvim', branch = 'relative-width'}
|
||||||
|
|
||||||
-- Telescope fuzzy find files/grep
|
-- Telescope fuzzy find files/grep
|
||||||
use {'nvim-lua/popup.nvim'}
|
use {'nvim-lua/popup.nvim'}
|
||||||
use {'nvim-lua/plenary.nvim'}
|
use {'nvim-lua/plenary.nvim'}
|
||||||
use {'nvim-telescope/telescope.nvim'}
|
use {'nvim-telescope/telescope.nvim'}
|
||||||
use {'nvim-telescope/telescope-project.nvim'}
|
use {'nvim-telescope/telescope-project.nvim'}
|
||||||
|
use {'nvim-telescope/telescope-fzy-native.nvim'}
|
||||||
|
|
||||||
-- Which Key
|
use {'theprimeagen/git-worktree.nvim'}
|
||||||
use {'folke/which-key.nvim'}
|
|
||||||
|
|
||||||
-- => Language Support
|
-- => Language Support
|
||||||
use {'neoclide/jsonc.vim'}
|
use {'neoclide/jsonc.vim'}
|
||||||
|
|
||||||
use {'ray-x/go.nvim'}
|
use {'rust-lang/rust.vim'}
|
||||||
use {'ray-x/guihua.lua'}
|
|
||||||
|
|
||||||
-- Debugger support via dap
|
-- Debugger support via dap
|
||||||
use { "rcarriga/nvim-dap-ui", requires = {"mfussenegger/nvim-dap"} }
|
use { "rcarriga/nvim-dap-ui", requires = {"mfussenegger/nvim-dap"} }
|
||||||
-- use {'vim-python/python-syntax', ft={'python'}, opt=true}
|
|
||||||
-- let g:python_highlight_all = 1
|
|
||||||
|
|
||||||
use {'JuliaEditorSupport/julia-vim', opt=true}
|
use {'JuliaEditorSupport/julia-vim', opt=true}
|
||||||
vim.g.latex_to_unicode_auto = 1
|
vim.g.latex_to_unicode_auto = 1
|
||||||
|
@ -1,4 +1,13 @@
|
|||||||
local cmp = require'cmp'
|
local cmp = require'cmp'
|
||||||
|
local lspkind = require('lspkind')
|
||||||
|
|
||||||
|
local source_mapping = {
|
||||||
|
buffer = "[Buffer]",
|
||||||
|
nvim_lsp = "[LSP]",
|
||||||
|
nvim_lua = "[Lua]",
|
||||||
|
cmp_tabnine = "[TN]",
|
||||||
|
path = "[Path]",
|
||||||
|
}
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
-- snippet = {
|
-- snippet = {
|
||||||
@ -14,22 +23,29 @@ cmp.setup({
|
|||||||
['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
|
['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
|
||||||
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
|
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
|
||||||
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
|
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
|
||||||
['<C-y>'] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
|
|
||||||
['<C-e>'] = cmp.mapping({
|
|
||||||
i = cmp.mapping.abort(),
|
|
||||||
c = cmp.mapping.close(),
|
|
||||||
}),
|
|
||||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||||
},
|
},
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'cmp_tabnine' },
|
||||||
-- { name = 'vsnip' }, -- For vsnip users.
|
{ name = 'nvim_lsp' },
|
||||||
-- { name = 'luasnip' }, -- For luasnip users.
|
},
|
||||||
-- { name = 'ultisnips' }, -- For ultisnips users.
|
{
|
||||||
-- { name = 'snippy' }, -- For snippy users.
|
{ name = 'buffer' },
|
||||||
}, {
|
}),
|
||||||
{ name = 'buffer' },
|
formatting = {
|
||||||
})
|
format = function(entry, vim_item)
|
||||||
|
vim_item.kind = lspkind.presets.default[vim_item.kind]
|
||||||
|
local menu = source_mapping[entry.source.name]
|
||||||
|
if entry.source.name == 'cmp_tabnine' then
|
||||||
|
if entry.completion_item.data ~= nil and entry.completion_item.data.detail ~= nil then
|
||||||
|
menu = entry.completion_item.data.detail .. ' ' .. menu
|
||||||
|
end
|
||||||
|
vim_item.kind = '?'
|
||||||
|
end
|
||||||
|
vim_item.menu = menu
|
||||||
|
return vim_item
|
||||||
|
end
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||||
@ -48,6 +64,20 @@ cmp.setup.cmdline(':', {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Setup tabnine
|
||||||
|
local tabnine = require('cmp_tabnine.config')
|
||||||
|
tabnine:setup({
|
||||||
|
max_lines = 1000;
|
||||||
|
max_num_results = 20;
|
||||||
|
sort = true;
|
||||||
|
run_on_every_keystroke = true;
|
||||||
|
snippet_placeholder = '..';
|
||||||
|
ignored_file_types = { -- default is not to ignore
|
||||||
|
-- uncomment to ignore in lua:
|
||||||
|
-- lua = true
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
-- Setup lspconfig.
|
-- Setup lspconfig.
|
||||||
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
||||||
|
@ -1,70 +0,0 @@
|
|||||||
vim.o.completeopt = "menuone,noselect"
|
|
||||||
|
|
||||||
require'compe'.setup {
|
|
||||||
enabled = true;
|
|
||||||
autocomplete = true;
|
|
||||||
debug = false;
|
|
||||||
min_length = 1;
|
|
||||||
preselect = 'enable';
|
|
||||||
throttle_time = 80;
|
|
||||||
source_timeout = 200;
|
|
||||||
incomplete_delay = 400;
|
|
||||||
max_abbr_width = 100;
|
|
||||||
max_kind_width = 100;
|
|
||||||
max_menu_width = 100;
|
|
||||||
documentation = true;
|
|
||||||
|
|
||||||
source = {
|
|
||||||
path = true;
|
|
||||||
buffer = true;
|
|
||||||
calc = true;
|
|
||||||
vsnip = false;
|
|
||||||
nvim_lsp = true;
|
|
||||||
nvim_lua = true;
|
|
||||||
spell = true;
|
|
||||||
tags = true;
|
|
||||||
snippets_nvim = true;
|
|
||||||
treesitter = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
local t = function(str)
|
|
||||||
return vim.api.nvim_replace_termcodes(str, true, true, true)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
local check_back_space = function()
|
|
||||||
local col = vim.fn.col('.') - 1
|
|
||||||
if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then
|
|
||||||
return true
|
|
||||||
else
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
_G.tab_complete = function()
|
|
||||||
if vim.fn.pumvisible() == 1 then
|
|
||||||
return t "<C-n>"
|
|
||||||
--elseif vim.fn.call("vsnip#available", {1}) == 1 then
|
|
||||||
--return t "<Plug>(vsnip-expand-or-jump)"
|
|
||||||
elseif check_back_space() then
|
|
||||||
return t "<Tab>"
|
|
||||||
else
|
|
||||||
return vim.fn['compe#complete']()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
_G.s_tab_complete = function()
|
|
||||||
if vim.fn.pumvisible() == 1 then
|
|
||||||
return t "<C-p>"
|
|
||||||
--elseif vim.fn.call("vsnip#jumpable", {-1}) == 1 then
|
|
||||||
--return t "<Plug>(vsnip-jump-prev)"
|
|
||||||
else
|
|
||||||
return t "<S-Tab>"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", {noremap = true, expr = true})
|
|
||||||
vim.api.nvim_set_keymap("s", "<Tab>", "v:lua.tab_complete()", {noremap = true, expr = true})
|
|
||||||
vim.api.nvim_set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", {noremap = true, expr = true})
|
|
||||||
vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", {noremap = true, expr = true})
|
|
@ -19,7 +19,7 @@ require('telescope').setup {
|
|||||||
file_ignore_patterns = {},
|
file_ignore_patterns = {},
|
||||||
generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter,
|
generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter,
|
||||||
shorten_path = true,
|
shorten_path = true,
|
||||||
winblend = 0,
|
winblend = 0,
|
||||||
width = 0.75,
|
width = 0.75,
|
||||||
preview_cutoff = 120,
|
preview_cutoff = 120,
|
||||||
results_height = 1,
|
results_height = 1,
|
||||||
|
@ -1,130 +0,0 @@
|
|||||||
require("which-key").setup {
|
|
||||||
plugins = {
|
|
||||||
marks = true, -- shows a list of your marks on ' and `
|
|
||||||
registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
|
|
||||||
-- the presets plugin, adds help for a bunch of default keybindings in Neovim
|
|
||||||
-- No actual key bindings are created
|
|
||||||
presets = {
|
|
||||||
operators = true, -- adds help for operators like d, y, ...
|
|
||||||
motions = true, -- adds help for motions
|
|
||||||
text_objects = true, -- help for text objects triggered after entering an operator
|
|
||||||
windows = true, -- default bindings on <c-w>
|
|
||||||
nav = true, -- misc bindings to work with windows
|
|
||||||
z = true, -- bindings for folds, spelling and others prefixed with z
|
|
||||||
g = true -- bindings for prefixed with g
|
|
||||||
}
|
|
||||||
},
|
|
||||||
icons = {
|
|
||||||
breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
|
|
||||||
separator = "➜", -- symbol used between a key and it's label
|
|
||||||
group = "+" -- symbol prepended to a group
|
|
||||||
},
|
|
||||||
window = {
|
|
||||||
border = "single", -- none, single, double, shadow
|
|
||||||
position = "bottom", -- bottom, top
|
|
||||||
margin = {1, 0, 1, 0}, -- extra window margin [top, right, bottom, left]
|
|
||||||
padding = {2, 2, 2, 2} -- extra window padding [top, right, bottom, left]
|
|
||||||
},
|
|
||||||
layout = {
|
|
||||||
height = {min = 4, max = 25}, -- min and max height of the columns
|
|
||||||
width = {min = 20, max = 50}, -- min and max width of the columns
|
|
||||||
spacing = 3 -- spacing between columns
|
|
||||||
},
|
|
||||||
hidden = {"<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ "}, -- hide mapping boilerplate
|
|
||||||
show_help = true -- show help message on the command line when the popup is visible
|
|
||||||
}
|
|
||||||
|
|
||||||
local opts = {
|
|
||||||
mode = "n", -- NORMAL mode
|
|
||||||
prefix = "<leader>",
|
|
||||||
buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings
|
|
||||||
silent = true, -- use `silent` when creating keymaps
|
|
||||||
noremap = true, -- use `noremap` when creating keymaps
|
|
||||||
nowait = false -- use `nowait` when creating keymaps
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Set leader
|
|
||||||
vim.api.nvim_set_keymap('n', '<Space>', '<NOP>', {noremap = true, silent = true})
|
|
||||||
vim.g.mapleader = ' '
|
|
||||||
|
|
||||||
-- explorer
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>e', ':NERDTreeToggle<CR>', {noremap = true, silent = true})
|
|
||||||
|
|
||||||
-- TODO create entire treesitter section
|
|
||||||
|
|
||||||
local mappings = {
|
|
||||||
["e"] = "Explorer",
|
|
||||||
["c"] = "NERDCommenter",
|
|
||||||
b = {
|
|
||||||
name = "+Buffers",
|
|
||||||
b = {"<C-^>", "Toggle Buffer"},
|
|
||||||
d = {"<cmd>bd<cr>", "Close Buffer"},
|
|
||||||
k = {"<cmd>bd!<cr>", "Kill Buffer"},
|
|
||||||
},
|
|
||||||
f = {
|
|
||||||
name = "Find",
|
|
||||||
f = {"<cmd>Telescope find_files<cr>", "Find File"},
|
|
||||||
p = {"<cmd>lua require'telescope'.extensions.project.project{}<CR>", "Project"},
|
|
||||||
g = {"<cmd>lua require'telescope.builtin'.live_grep()<cr>", "Grep files"},
|
|
||||||
b = {"<cmd>lua require'telescope.builtin'.buffers{}<cr>", "Buffers"},
|
|
||||||
t = {"<cmd>lua require'telescope.builtin'.help_tags{}<cr>", "Tags"},
|
|
||||||
},
|
|
||||||
g = {
|
|
||||||
name = "+Git",
|
|
||||||
j = {"<cmd>GitGutterNextHunk<cr>", "Next Hunk"},
|
|
||||||
k = {"<cmd>GitGutterPrevHunk<cr>", "Prev Hunk"},
|
|
||||||
p = {"<cmd>GitGutterPreviewHunk<cr>", "Preview Hunk"},
|
|
||||||
r = {"<cmd>GitGutterResetHunk<cr>", "Reset Hunk"},
|
|
||||||
s = {"<cmd>GitGutterStageHunk<cr>", "Stage Hunk"},
|
|
||||||
u = {"<cmd>GitGutterUndoHunk<cr>", "Undo Stage Hunk"},
|
|
||||||
o = {"<cmd>Telescope git_status<cr>", "Open changed file"},
|
|
||||||
b = {"<cmd>Telescope git_branches<cr>", "Checkout branch"},
|
|
||||||
c = {"<cmd>Telescope git_commits<cr>", "Checkout commit"},
|
|
||||||
C = {"<cmd>Telescope git_bcommits<cr>", "Checkout commit(for current file)"},
|
|
||||||
},
|
|
||||||
l = {
|
|
||||||
name = "+LSP",
|
|
||||||
a = {"<cmd>Lspsaga code_action<cr>", "Code Action"},
|
|
||||||
A = {"<cmd>Lspsaga range_code_action<cr>", "Selected Action"},
|
|
||||||
d = {"<cmd>Telescope lsp_document_diagnostics<cr>", "Document Diagnostics"},
|
|
||||||
D = {"<cmd>Telescope lsp_workspace_diagnostics<cr>", "Workspace Diagnostics"},
|
|
||||||
i = {"<cmd>LspInfo<cr>", "Info"},
|
|
||||||
l = {"<cmd>Lspsaga lsp_finder<cr>", "LSP Finder"},
|
|
||||||
L = {"<cmd>Lspsaga show_line_diagnostics<cr>", "Line Diagnostics"},
|
|
||||||
p = {"<cmd>Lspsaga preview_definition<cr>", "Preview Definition"},
|
|
||||||
q = {"<cmd>Telescope quickfix<cr>", "Quickfix"},
|
|
||||||
r = {"<cmd>Lspsaga rename<cr>", "Rename"},
|
|
||||||
t = {"<cmd>LspTypeDefinition<cr>", "Type Definition"},
|
|
||||||
x = {"<cmd>cclose<cr>", "Close Quickfix"},
|
|
||||||
s = {"<cmd>Telescope lsp_document_symbols<cr>", "Document Symbols"},
|
|
||||||
S = {"<cmd>Telescope lsp_workspace_symbols<cr>", "Workspace Symbols"}
|
|
||||||
},
|
|
||||||
d = {
|
|
||||||
f = {":lua require'functions'.edit_dotfiles()<cr>", "Dotfiles search"}
|
|
||||||
},
|
|
||||||
s = {
|
|
||||||
name = "+Search",
|
|
||||||
b = {"<cmd>Telescope git_branches<cr>", "Checkout branch"},
|
|
||||||
c = {"<cmd>Telescope colorscheme<cr>", "Colorscheme"},
|
|
||||||
d = {"<cmd>Telescope lsp_document_diagnostics<cr>", "Document Diagnostics"},
|
|
||||||
D = {"<cmd>Telescope lsp_workspace_diagnostics<cr>", "Workspace Diagnostics"},
|
|
||||||
f = {"<cmd>Telescope find_files<cr>", "Find File"},
|
|
||||||
m = {"<cmd>Telescope marks<cr>", "Marks"},
|
|
||||||
M = {"<cmd>Telescope man_pages<cr>", "Man Pages"},
|
|
||||||
r = {"<cmd>Telescope oldfiles<cr>", "Open Recent File"},
|
|
||||||
R = {"<cmd>Telescope registers<cr>", "Registers"},
|
|
||||||
t = {"<cmd>Telescope live_grep<cr>", "Text"}
|
|
||||||
},
|
|
||||||
S = {
|
|
||||||
name = "+Session",
|
|
||||||
s = {"<cmd>SessionSave<cr>", "Save Session"},
|
|
||||||
l = {"<cmd>SessionLoad<cr>", "Load Session"}
|
|
||||||
},
|
|
||||||
t = {
|
|
||||||
name = "+Tagbar",
|
|
||||||
t = {"<cmd>TagbarToggle<cr>", "Toggle Tagbar"},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local wk = require("which-key")
|
|
||||||
wk.register(mappings, opts)
|
|
@ -94,6 +94,11 @@ _G.packer_plugins = {
|
|||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/cmp-path",
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/cmp-path",
|
||||||
url = "https://github.com/hrsh7th/cmp-path"
|
url = "https://github.com/hrsh7th/cmp-path"
|
||||||
},
|
},
|
||||||
|
["cmp-tabnine"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/cmp-tabnine",
|
||||||
|
url = "https://github.com/tzachar/cmp-tabnine"
|
||||||
|
},
|
||||||
["darcula-solid.nvim"] = {
|
["darcula-solid.nvim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/darcula-solid.nvim",
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/darcula-solid.nvim",
|
||||||
@ -109,10 +114,15 @@ _G.packer_plugins = {
|
|||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/editorconfig-vim",
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/editorconfig-vim",
|
||||||
url = "https://github.com/editorconfig/editorconfig-vim"
|
url = "https://github.com/editorconfig/editorconfig-vim"
|
||||||
},
|
},
|
||||||
["go.nvim"] = {
|
everforest = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/go.nvim",
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/everforest",
|
||||||
url = "https://github.com/ray-x/go.nvim"
|
url = "https://github.com/sainnhe/everforest"
|
||||||
|
},
|
||||||
|
["git-worktree.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/git-worktree.nvim",
|
||||||
|
url = "https://github.com/theprimeagen/git-worktree.nvim"
|
||||||
},
|
},
|
||||||
["jsonc.vim"] = {
|
["jsonc.vim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
@ -130,6 +140,11 @@ _G.packer_plugins = {
|
|||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/lsp-status.nvim",
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/lsp-status.nvim",
|
||||||
url = "https://github.com/nvim-lua/lsp-status.nvim"
|
url = "https://github.com/nvim-lua/lsp-status.nvim"
|
||||||
},
|
},
|
||||||
|
["lspkind-nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/lspkind-nvim",
|
||||||
|
url = "https://github.com/onsails/lspkind-nvim"
|
||||||
|
},
|
||||||
["lspsaga.nvim"] = {
|
["lspsaga.nvim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/lspsaga.nvim",
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/lspsaga.nvim",
|
||||||
@ -155,16 +170,6 @@ _G.packer_plugins = {
|
|||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nerdcommenter",
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nerdcommenter",
|
||||||
url = "https://github.com/preservim/nerdcommenter"
|
url = "https://github.com/preservim/nerdcommenter"
|
||||||
},
|
},
|
||||||
nerdtree = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nerdtree",
|
|
||||||
url = "https://github.com/preservim/nerdtree"
|
|
||||||
},
|
|
||||||
["nerdtree-git-plugin"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nerdtree-git-plugin",
|
|
||||||
url = "https://github.com/Xuyuanp/nerdtree-git-plugin"
|
|
||||||
},
|
|
||||||
["nord-vim"] = {
|
["nord-vim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nord-vim",
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nord-vim",
|
||||||
@ -175,16 +180,26 @@ _G.packer_plugins = {
|
|||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-cmp",
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-cmp",
|
||||||
url = "https://github.com/hrsh7th/nvim-cmp"
|
url = "https://github.com/hrsh7th/nvim-cmp"
|
||||||
},
|
},
|
||||||
|
["nvim-dap"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-dap",
|
||||||
|
url = "https://github.com/mfussenegger/nvim-dap"
|
||||||
|
},
|
||||||
|
["nvim-dap-ui"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-dap-ui",
|
||||||
|
url = "https://github.com/rcarriga/nvim-dap-ui"
|
||||||
|
},
|
||||||
|
["nvim-lsp-installer"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-lsp-installer",
|
||||||
|
url = "https://github.com/williamboman/nvim-lsp-installer"
|
||||||
|
},
|
||||||
["nvim-lspconfig"] = {
|
["nvim-lspconfig"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
||||||
url = "https://github.com/neovim/nvim-lspconfig"
|
url = "https://github.com/neovim/nvim-lspconfig"
|
||||||
},
|
},
|
||||||
["nvim-lspinstall"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-lspinstall",
|
|
||||||
url = "https://github.com/kabouzeid/nvim-lspinstall"
|
|
||||||
},
|
|
||||||
["nvim-treesitter"] = {
|
["nvim-treesitter"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
||||||
@ -215,6 +230,11 @@ _G.packer_plugins = {
|
|||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/popup.nvim",
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/popup.nvim",
|
||||||
url = "https://github.com/nvim-lua/popup.nvim"
|
url = "https://github.com/nvim-lua/popup.nvim"
|
||||||
},
|
},
|
||||||
|
["rust.vim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/rust.vim",
|
||||||
|
url = "https://github.com/rust-lang/rust.vim"
|
||||||
|
},
|
||||||
["symbols-outline.nvim"] = {
|
["symbols-outline.nvim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/symbols-outline.nvim",
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/symbols-outline.nvim",
|
||||||
@ -225,6 +245,11 @@ _G.packer_plugins = {
|
|||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/tagbar",
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/tagbar",
|
||||||
url = "https://github.com/preservim/tagbar"
|
url = "https://github.com/preservim/tagbar"
|
||||||
},
|
},
|
||||||
|
["telescope-fzy-native.nvim"] = {
|
||||||
|
loaded = true,
|
||||||
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/telescope-fzy-native.nvim",
|
||||||
|
url = "https://github.com/nvim-telescope/telescope-fzy-native.nvim"
|
||||||
|
},
|
||||||
["telescope-project.nvim"] = {
|
["telescope-project.nvim"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/telescope-project.nvim",
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/telescope-project.nvim",
|
||||||
@ -235,21 +260,11 @@ _G.packer_plugins = {
|
|||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
||||||
url = "https://github.com/nvim-telescope/telescope.nvim"
|
url = "https://github.com/nvim-telescope/telescope.nvim"
|
||||||
},
|
},
|
||||||
["vim-devicons"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-devicons",
|
|
||||||
url = "https://github.com/ryanoasis/vim-devicons"
|
|
||||||
},
|
|
||||||
["vim-easy-align"] = {
|
["vim-easy-align"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-easy-align",
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-easy-align",
|
||||||
url = "https://github.com/junegunn/vim-easy-align"
|
url = "https://github.com/junegunn/vim-easy-align"
|
||||||
},
|
},
|
||||||
["vim-floaterm"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-floaterm",
|
|
||||||
url = "https://github.com/voldikss/vim-floaterm"
|
|
||||||
},
|
|
||||||
["vim-fugitive"] = {
|
["vim-fugitive"] = {
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-fugitive",
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-fugitive",
|
||||||
@ -274,11 +289,6 @@ _G.packer_plugins = {
|
|||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-surround",
|
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-surround",
|
||||||
url = "https://github.com/tpope/vim-surround"
|
url = "https://github.com/tpope/vim-surround"
|
||||||
},
|
|
||||||
["which-key.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/which-key.nvim",
|
|
||||||
url = "https://github.com/folke/which-key.nvim"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user