nvim: Switch to lsp-zero
lsp-zero offers a simple to set-up lsp configuration which is based around the plugins I use anyway (lsp, cmp, luasnip) but integrates them very well. I add a few small quality of life things on top (cmp completion for / search and for vim command mode) as well as a boatload of custom completion sources but otherwise make use of the nice presets. This has de-bloated my _cmp.lua settings somewhat and allows me to have a simple treesitter and a simple(r) lsp setup! Additionally, switched to mason.nvim to manage my lsp sources (and linters), which is both the new hotness and actually really useful. Allows portable installation of most lsp servers into neovim data directory so they do not clutter any other directories or global namespaces.
This commit is contained in:
parent
ee4640b186
commit
2026f6d064
3 changed files with 137 additions and 195 deletions
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"BetterLua.vim": { "branch": "master", "commit": "d2d6c115575d09258a794a6f20ac60233eee59d5" },
|
"BetterLua.vim": { "branch": "master", "commit": "d2d6c115575d09258a794a6f20ac60233eee59d5" },
|
||||||
|
"LuaSnip": { "branch": "master", "commit": "500981ff6cefc7343e3959ef0f939bd0bfd49ba9" },
|
||||||
"Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" },
|
"Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" },
|
||||||
"bats.vim": { "branch": "master", "commit": "6a5d2ef22b0ede503d867770afd02ebb1f97b709" },
|
"bats.vim": { "branch": "master", "commit": "6a5d2ef22b0ede503d867770afd02ebb1f97b709" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
|
@ -12,7 +13,7 @@
|
||||||
"cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" },
|
"cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" },
|
||||||
"cmp-tmux": { "branch": "main", "commit": "984772716f66d8ee88535a6bf3f94c4b4e1301f5" },
|
"cmp-tmux": { "branch": "main", "commit": "984772716f66d8ee88535a6bf3f94c4b4e1301f5" },
|
||||||
"cmp-treesitter": { "branch": "master", "commit": "b40178b780d547bcf131c684bc5fd41af17d05f2" },
|
"cmp-treesitter": { "branch": "master", "commit": "b40178b780d547bcf131c684bc5fd41af17d05f2" },
|
||||||
"cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" },
|
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
||||||
"completion-vcard": { "branch": "master", "commit": "2220fd517a985ececed1adcf0e5be8f2815564c7" },
|
"completion-vcard": { "branch": "master", "commit": "2220fd517a985ececed1adcf0e5be8f2815564c7" },
|
||||||
"dial.nvim": { "branch": "master", "commit": "5020da900cc5dfd7067f181ee2ebd872ca7c84e8" },
|
"dial.nvim": { "branch": "master", "commit": "5020da900cc5dfd7067f181ee2ebd872ca7c84e8" },
|
||||||
"formatter.nvim": { "branch": "master", "commit": "8a4c961330cc4688087f23d18fa7d2f1af9a4902" },
|
"formatter.nvim": { "branch": "master", "commit": "8a4c961330cc4688087f23d18fa7d2f1af9a4902" },
|
||||||
|
@ -21,11 +22,14 @@
|
||||||
"guihua.lua": { "branch": "master", "commit": "d3f6d01639b52e6a83ea98dd6ca244c9aa98b79b" },
|
"guihua.lua": { "branch": "master", "commit": "d3f6d01639b52e6a83ea98dd6ca244c9aa98b79b" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "273081443471cbc52c327bcb99614c32f247998d" },
|
"lazy.nvim": { "branch": "main", "commit": "273081443471cbc52c327bcb99614c32f247998d" },
|
||||||
"lightspeed.nvim": { "branch": "main", "commit": "299eefa6a9e2d881f1194587c573dad619fdb96f" },
|
"lightspeed.nvim": { "branch": "main", "commit": "299eefa6a9e2d881f1194587c573dad619fdb96f" },
|
||||||
|
"lsp-format.nvim": { "branch": "master", "commit": "ca0df5c8544e51517209ea7b86ecc522c98d4f0a" },
|
||||||
|
"lsp-zero.nvim": { "branch": "main", "commit": "42bc5a1081666098a7154532e6ff5e3edc483b39" },
|
||||||
"lsp_signature.nvim": { "branch": "master", "commit": "6f6252f63b0baf0f2224c4caea33819a27f3f550" },
|
"lsp_signature.nvim": { "branch": "master", "commit": "6f6252f63b0baf0f2224c4caea33819a27f3f550" },
|
||||||
"lspkind-nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" },
|
|
||||||
"lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" },
|
"lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" },
|
||||||
"magma-nvim-goose": { "branch": "main", "commit": "94370733757d550594fe4a1d65643949d7485989" },
|
"magma-nvim-goose": { "branch": "main", "commit": "94370733757d550594fe4a1d65643949d7485989" },
|
||||||
"markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" },
|
"markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" },
|
||||||
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "7a97a77eee486ae152d2c559a459eda7c8aa12aa" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "14ae1ca58440b158a0a35cf90773013caddf788a" },
|
||||||
"mini.nvim": { "branch": "main", "commit": "dc0ccf1b0499d649a6177d2a406babcfe73b97de" },
|
"mini.nvim": { "branch": "main", "commit": "dc0ccf1b0499d649a6177d2a406babcfe73b97de" },
|
||||||
"nabla.nvim": { "branch": "master", "commit": "ddbfc6e244e79db9280c535ee85c81388c5d1b46" },
|
"nabla.nvim": { "branch": "master", "commit": "ddbfc6e244e79db9280c535ee85c81388c5d1b46" },
|
||||||
"navigator.lua": { "branch": "master", "commit": "66d84151e94052f710b1dfb0d1fce2faaca6dced" },
|
"navigator.lua": { "branch": "master", "commit": "66d84151e94052f710b1dfb0d1fce2faaca6dced" },
|
||||||
|
@ -63,7 +67,6 @@
|
||||||
"vim-pandoc": { "branch": "master", "commit": "9f406d964ca70d959b7867f1b5cee3d4884d4d3c" },
|
"vim-pandoc": { "branch": "master", "commit": "9f406d964ca70d959b7867f1b5cee3d4884d4d3c" },
|
||||||
"vim-pandoc-syntax": { "branch": "master", "commit": "4268535e1d33117a680a91160d845cd3833dfe28" },
|
"vim-pandoc-syntax": { "branch": "master", "commit": "4268535e1d33117a680a91160d845cd3833dfe28" },
|
||||||
"vim-spellsync": { "branch": "master", "commit": "27e103f2d283a1f6e24cc99dbdcd624713aff277" },
|
"vim-spellsync": { "branch": "master", "commit": "27e103f2d283a1f6e24cc99dbdcd624713aff277" },
|
||||||
"vim-vsnip": { "branch": "master", "commit": "8dde8c0ef10bb1afdbb301e2bd7eb1c153dd558e" },
|
|
||||||
"which-key.nvim": { "branch": "main", "commit": "684e96c5e8477f1ee9b3f2e9a12d802fd12c5531" },
|
"which-key.nvim": { "branch": "main", "commit": "684e96c5e8477f1ee9b3f2e9a12d802fd12c5531" },
|
||||||
"zen-mode.nvim": { "branch": "main", "commit": "3c92f503823088862ca2a7809d1c7edc90fb92fa" },
|
"zen-mode.nvim": { "branch": "main", "commit": "3c92f503823088862ca2a7809d1c7edc90fb92fa" },
|
||||||
"zettelkasten.nvim": { "branch": "main", "commit": "0e77624689b470410f5355b613d45219c9350264" }
|
"zettelkasten.nvim": { "branch": "main", "commit": "0e77624689b470410f5355b613d45219c9350264" }
|
||||||
|
|
|
@ -1,95 +1,40 @@
|
||||||
local cmp = require 'cmp'
|
local lsp = require("lsp-zero")
|
||||||
local lspkind = require 'lspkind'
|
lsp.preset("recommended")
|
||||||
|
lsp.on_attach(function(client, bufnr)
|
||||||
local has_words_before = function()
|
require("lsp-format").on_attach(client, bufnr)
|
||||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
end)
|
||||||
return col ~= 0 and
|
lsp.nvim_workspace()
|
||||||
vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col,
|
lsp.setup_nvim_cmp({
|
||||||
col)
|
sources = {
|
||||||
:match("%s") == nil
|
{ name = 'path' }, { name = 'nvim_lsp', keyword_length = 2 },
|
||||||
end
|
{ name = 'buffer', keyword_length = 3 },
|
||||||
|
{ name = 'luasnip', keyword_length = 2 }, { name = 'tmux' },
|
||||||
local feedkey = function(key, mode)
|
{ name = 'otter' }, { name = 'latex_symbols' }, { name = 'vCard' },
|
||||||
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true),
|
{ name = 'nvim_lua' }, { name = 'buffer' }, { name = 'spell' }
|
||||||
mode, true)
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.o.completeopt = "menu,menuone,noselect"
|
|
||||||
|
|
||||||
-- completion items
|
|
||||||
require('cmp').register_source('vCard', require('completion_vcard').setup_cmp(
|
|
||||||
'~/documents/contacts/myconts'))
|
|
||||||
vim.g.vsnip_snippet_dir = (vim.env.XDG_DATA_HOME or "~/.local/share") ..
|
|
||||||
"/nvim/snippets"
|
|
||||||
cmp.setup({
|
|
||||||
snippet = { expand = function(args) vim.fn["vsnip#anonymous"](args.body) end },
|
|
||||||
mapping = {
|
|
||||||
['<C-b>'] = 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-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()
|
|
||||||
}),
|
|
||||||
-- Accept currently selected item. If none selected, `select` first item.
|
|
||||||
-- Set `select` to `false` to only confirm explicitly selected items.
|
|
||||||
['<CR>'] = cmp.mapping.confirm({ select = false }),
|
|
||||||
["<C-n>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item()
|
|
||||||
elseif vim.fn["vsnip#available"](1) == 1 then
|
|
||||||
feedkey("<Plug>(vsnip-expand-or-jump)", "")
|
|
||||||
elseif has_words_before() then
|
|
||||||
cmp.complete()
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, { "i", "s" }),
|
|
||||||
|
|
||||||
["<C-p>"] = cmp.mapping(function()
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_prev_item()
|
|
||||||
elseif vim.fn["vsnip#jumpable"](-1) == 1 then
|
|
||||||
feedkey("<Plug>(vsnip-jump-prev)", "")
|
|
||||||
end
|
|
||||||
end, { "i", "s" })
|
|
||||||
},
|
},
|
||||||
formatting = {
|
documentation = {
|
||||||
format = lspkind.cmp_format({
|
max_height = 50,
|
||||||
with_text = false,
|
max_width = 90,
|
||||||
menu = ({
|
border = 'rounded',
|
||||||
buffer = "B",
|
col_offset = 0,
|
||||||
nvim_lua = "NLua",
|
side_padding = 1,
|
||||||
tmux = "τ",
|
winhighlight = 'Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None',
|
||||||
vCard = "VCARD"
|
zindex = 1001
|
||||||
})
|
}
|
||||||
})
|
|
||||||
},
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = 'path' }, { name = 'nvim_lsp' }, { name = 'treesitter' },
|
|
||||||
{ name = 'tmux' }, { name = 'vsnip' }, { name = 'otter' },
|
|
||||||
{ name = 'latex_symbols' }, { name = 'vCard' }, { name = 'nvim_lua' }
|
|
||||||
}, { { name = 'buffer' }, { name = 'spell' } })
|
|
||||||
})
|
})
|
||||||
|
lsp.setup()
|
||||||
|
vim.diagnostic.config { virtual_text = true }
|
||||||
|
|
||||||
if vim.o.ft == 'clap_input' and vim.o.ft == 'guihua' and vim.o.ft ==
|
local cmp = require 'cmp'
|
||||||
'guihua_rust' then require 'cmp'.setup.buffer { completion = { enable = false } } end
|
-- `/` cmdline setup.
|
||||||
|
|
||||||
-- set up pandoc bibtex source generation
|
|
||||||
require 'cmp_pandoc'.setup()
|
|
||||||
|
|
||||||
-- Use buffer source for `/` search
|
|
||||||
cmp.setup.cmdline('/', {
|
cmp.setup.cmdline('/', {
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
sources = cmp.config.sources({ { name = 'buffer' } })
|
sources = { { name = 'buffer' } }
|
||||||
})
|
})
|
||||||
|
-- `:` cmdline setup.
|
||||||
-- Use cmdline & path source for ':' in vim
|
|
||||||
cmp.setup.cmdline(':', {
|
cmp.setup.cmdline(':', {
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
sources = cmp.config.sources({ { name = 'path' } }, { { name = 'cmdline' } })
|
sources = cmp.config.sources({ { name = 'path' } }, {
|
||||||
|
{ name = 'cmdline', option = { ignore_cmds = { 'Man', '!' } } }
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol
|
|
||||||
.make_client_capabilities())
|
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
local writing_ft = {"quarto", "pandoc", "markdown", "text", "tex"}
|
local writing_ft = { "quarto", "pandoc", "markdown", "text", "tex" }
|
||||||
|
|
||||||
return {
|
return {
|
||||||
-- vim plugs
|
-- vim plugs
|
||||||
-- essential
|
-- essential
|
||||||
{'numToStr/Navigator.nvim', config = true}, -- allow seamless navigation between vim buffers and tmux/wezterm splits
|
{ 'numToStr/Navigator.nvim', config = true }, -- allow seamless navigation between vim buffers and tmux/wezterm splits
|
||||||
{'jeffkreeftmeijer/vim-numbertoggle', event = "BufEnter"}, -- toggles numbers to absolute for all buffers but the current which is relative
|
{ 'jeffkreeftmeijer/vim-numbertoggle', event = "BufEnter" }, -- toggles numbers to absolute for all buffers but the current which is relative
|
||||||
{'ojroques/vim-oscyank', event = "VeryLazy"}, -- yank from *anywhere* (even ssh session) to clipboard, using :OSCYank
|
{ 'ojroques/vim-oscyank', event = "VeryLazy" }, -- yank from *anywhere* (even ssh session) to clipboard, using :OSCYank
|
||||||
{'ggandor/lightspeed.nvim', event = "VeryLazy"}, -- jump between letters with improved fFtT quicksearch, mimics sneak
|
{ 'ggandor/lightspeed.nvim', event = "VeryLazy" }, -- jump between letters with improved fFtT quicksearch, mimics sneak
|
||||||
-- files
|
-- files
|
||||||
{'vifm/vifm.vim'}, -- integrate file manager
|
{ 'vifm/vifm.vim' }, -- integrate file manager
|
||||||
{
|
{
|
||||||
'lewis6991/gitsigns.nvim', -- show vcs changes on left-hand gutter
|
'lewis6991/gitsigns.nvim', -- show vcs changes on left-hand gutter
|
||||||
config = true,
|
config = true,
|
||||||
event = "BufRead"
|
event = "BufRead"
|
||||||
}, {
|
}, {
|
||||||
'norcalli/nvim-colorizer.lua', -- color hex, named colors in the correct preview scheme
|
'norcalli/nvim-colorizer.lua', -- color hex, named colors in the correct preview scheme
|
||||||
config = true,
|
config = true,
|
||||||
event = "VeryLazy"
|
event = "VeryLazy"
|
||||||
}, {
|
}, {
|
||||||
'mhartington/formatter.nvim', -- auto formatting on save
|
'mhartington/formatter.nvim', -- auto formatting on save
|
||||||
config = function() require('plug._format') end,
|
config = function() require('plug._format') end,
|
||||||
event = "VeryLazy"
|
event = "VeryLazy"
|
||||||
}, -- editing
|
}, -- editing
|
||||||
{'kylechui/nvim-surround', version = '*', config = true, event = "VeryLazy"}, -- surround things with other things using ys/cs/ds
|
{ 'kylechui/nvim-surround', version = '*', config = true, event = "VeryLazy" }, -- surround things with other things using ys/cs/ds
|
||||||
{
|
{
|
||||||
'monaqa/dial.nvim', -- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers
|
'monaqa/dial.nvim', -- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers
|
||||||
config = function()
|
config = function()
|
||||||
|
@ -39,61 +39,61 @@ return {
|
||||||
augend.constant.alias.bool, augend.semver.alias.semver,
|
augend.constant.alias.bool, augend.semver.alias.semver,
|
||||||
augend.constant.alias.Alpha, augend.constant.alias.alpha,
|
augend.constant.alias.Alpha, augend.constant.alias.alpha,
|
||||||
augend.hexcolor.new { case = "lower" }, augend.constant.new {
|
augend.hexcolor.new { case = "lower" }, augend.constant.new {
|
||||||
elements = { "and", "or" },
|
elements = { "and", "or" },
|
||||||
word = true, -- if false, "sand" is incremented into "sor", "doctor" into "doctand", etc.
|
word = true, -- if false, "sand" is incremented into "sor", "doctor" into "doctand", etc.
|
||||||
cyclic = true -- "or" is incremented into "and".
|
cyclic = true -- "or" is incremented into "and".
|
||||||
},
|
},
|
||||||
augend.constant
|
augend.constant
|
||||||
.new {
|
.new {
|
||||||
elements = { "&&", "||" },
|
elements = { "&&", "||" },
|
||||||
word = false,
|
word = false,
|
||||||
cyclic = true
|
cyclic = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
event = "VeryLazy"
|
event = "VeryLazy"
|
||||||
}, {
|
}, {
|
||||||
'tommcdo/vim-exchange', -- adds exchange operator with cx. common use: cxiw . on 2 words to switch
|
'tommcdo/vim-exchange', -- adds exchange operator with cx. common use: cxiw . on 2 words to switch
|
||||||
event = "VeryLazy"
|
event = "VeryLazy"
|
||||||
}, {
|
}, {
|
||||||
'junegunn/vim-easy-align', -- Align tables and other alignable things
|
'junegunn/vim-easy-align', -- Align tables and other alignable things
|
||||||
event = "VeryLazy"
|
event = "VeryLazy"
|
||||||
}, -- colorschemes
|
}, -- colorschemes
|
||||||
{'norcalli/nvim-base16.lua'}, --
|
{ 'norcalli/nvim-base16.lua' }, --
|
||||||
-- statusline
|
-- statusline
|
||||||
{
|
{
|
||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
requires = {'kyazdani42/nvim-web-devicons', opt = true},
|
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
|
||||||
config = function() require('plug._lualine') end
|
config = function() require('plug._lualine') end
|
||||||
}, -- writing
|
}, -- writing
|
||||||
{'vim-pandoc/vim-pandoc-syntax', ft = writing_ft},
|
{ 'vim-pandoc/vim-pandoc-syntax', ft = writing_ft },
|
||||||
{'vim-pandoc/vim-pandoc', ft = writing_ft},
|
{ 'vim-pandoc/vim-pandoc', ft = writing_ft },
|
||||||
{'vim-pandoc/vim-criticmarkup', ft = writing_ft}, {
|
{ 'vim-pandoc/vim-criticmarkup', ft = writing_ft }, {
|
||||||
'quarto-dev/quarto-nvim',
|
'quarto-dev/quarto-nvim',
|
||||||
dependencies = {'jmbuhr/otter.nvim', 'neovim/nvim-lspconfig'},
|
dependencies = { 'jmbuhr/otter.nvim', 'neovim/nvim-lspconfig' },
|
||||||
config = function()
|
config = function()
|
||||||
require'quarto'.setup {
|
require 'quarto'.setup {
|
||||||
lspFeatures = {
|
lspFeatures = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
languages = {'r', 'python', 'julia'},
|
languages = { 'r', 'python', 'julia' },
|
||||||
diagnostics = {enabled = true, triggers = {"BufWrite"}},
|
diagnostics = { enabled = true, triggers = { "BufWrite" } },
|
||||||
completion = {enabled = true}
|
completion = { enabled = true }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
end,
|
}
|
||||||
ft = writing_ft
|
end,
|
||||||
}, {'micarmst/vim-spellsync', event = "VeryLazy"}, -- personal dict improvements for git sync
|
ft = writing_ft
|
||||||
{'folke/zen-mode.nvim', config = true, event = "VeryLazy"}, -- provide distraction free writing
|
}, { 'micarmst/vim-spellsync', event = "VeryLazy" }, -- personal dict improvements for git sync
|
||||||
{'folke/twilight.nvim', event = "VeryLazy"}, -- provide even distraction free-er writing (lowlight paragraphs)
|
{ 'folke/zen-mode.nvim', config = true, event = "VeryLazy" }, -- provide distraction free writing
|
||||||
{'marty-oehme/zettelkasten.nvim', ft = writing_ft, event = "VeryLazy"}, -- simple static markdown linking
|
{ 'folke/twilight.nvim', event = "VeryLazy" }, -- provide even distraction free-er writing (lowlight paragraphs)
|
||||||
|
{ 'marty-oehme/zettelkasten.nvim', ft = writing_ft, event = "VeryLazy" }, -- simple static markdown linking
|
||||||
{
|
{
|
||||||
"iamcco/markdown-preview.nvim", -- generate an auto-updating html preview for md files
|
"iamcco/markdown-preview.nvim", -- generate an auto-updating html preview for md files
|
||||||
build = function() vim.fn["mkdp#util#install"]() end,
|
build = function() vim.fn["mkdp#util#install"]() end,
|
||||||
ft = writing_ft
|
ft = writing_ft
|
||||||
}, -- languages
|
}, -- languages
|
||||||
{'euclidianAce/BetterLua.vim', ft = 'lua'}, -- better syntax highlighting for lua
|
{ 'euclidianAce/BetterLua.vim', ft = 'lua' }, -- better syntax highlighting for lua
|
||||||
{'aliou/bats.vim', ft = {"bash", "sh", "zsh", "bats"}}, -- enable syntax for bats shell-code testing library
|
{ 'aliou/bats.vim', ft = { "bash", "sh", "zsh", "bats" } }, -- enable syntax for bats shell-code testing library
|
||||||
|
|
||||||
-- REPL work
|
-- REPL work
|
||||||
{
|
{
|
||||||
|
@ -108,41 +108,37 @@ return {
|
||||||
'echasnovski/mini.nvim',
|
'echasnovski/mini.nvim',
|
||||||
version = '*',
|
version = '*',
|
||||||
config = function() require('plug._mini') end
|
config = function() require('plug._mini') end
|
||||||
},
|
}, {
|
||||||
{
|
"akinsho/nvim-toggleterm.lua", -- simpler, programmable and multiple terminal toggling for nvim
|
||||||
"akinsho/nvim-toggleterm.lua", -- simpler, programmable and multiple terminal toggling for nvim
|
config = function() require('plug._toggleterm') end,
|
||||||
config = function() require('plug._toggleterm') end,
|
event = "BufWinEnter"
|
||||||
event = "BufWinEnter"
|
},
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
config = function() require("which-key").setup {} end
|
config = function() require("which-key").setup {} end
|
||||||
}, {
|
}, {
|
||||||
"nvim-neorg/neorg",
|
"nvim-neorg/neorg",
|
||||||
config = function() require("plug._neorg") end,
|
config = function() require("plug._neorg") end,
|
||||||
dependencies = {"nvim-lua/plenary.nvim"},
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
version = "*",
|
version = "*",
|
||||||
ft = "norg"
|
ft = "norg"
|
||||||
}, -- extensive organization plugin mimicking orgmode
|
}, -- extensive organization plugin mimicking orgmode
|
||||||
-- fuzzy matching
|
-- fuzzy matching
|
||||||
{"nvim-telescope/telescope-fzf-native.nvim", build = 'make'}, {
|
{ "nvim-telescope/telescope-fzf-native.nvim", build = 'make' }, {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
dependencies = {"nvim-lua/popup.nvim", "nvim-lua/plenary.nvim"},
|
dependencies = { "nvim-lua/popup.nvim", "nvim-lua/plenary.nvim" },
|
||||||
config = function() require('plug._telescope') end
|
config = function() require('plug._telescope') end
|
||||||
}, -- snippeting
|
}, -- treesitter
|
||||||
{"hrsh7th/vim-vsnip", event = "InsertEnter"}, -- snippet engine
|
|
||||||
{"rafamadriz/friendly-snippets", event = "InsertEnter"}, -- many snippets
|
|
||||||
-- treesitter
|
|
||||||
{
|
{
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
build = ':TSUpdate',
|
build = ':TSUpdate',
|
||||||
config = function() require('plug._treesitter') end
|
config = function() require('plug._treesitter') end
|
||||||
}, {'nvim-treesitter/playground', cmd = "TSPlaygroundToggle"}, -- interactively view and query the treesitter tree
|
}, { 'nvim-treesitter/playground', cmd = "TSPlaygroundToggle" }, -- interactively view and query the treesitter tree
|
||||||
{'romgrk/nvim-treesitter-context', event = "BufReadPre", config = true}, -- show current cursor context at top of buffer
|
{ 'romgrk/nvim-treesitter-context', event = "BufReadPre", config = true }, -- show current cursor context at top of buffer
|
||||||
{
|
{
|
||||||
'RRethy/nvim-treesitter-textsubjects', -- allows using . and ; to target treesitter branches
|
'RRethy/nvim-treesitter-textsubjects', -- allows using . and ; to target treesitter branches
|
||||||
config = function()
|
config = function()
|
||||||
require'nvim-treesitter.configs'.setup {
|
require 'nvim-treesitter.configs'.setup {
|
||||||
textsubjects = {
|
textsubjects = {
|
||||||
enable = true,
|
enable = true,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
|
@ -153,49 +149,47 @@ return {
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
event = "BufReadPre"
|
event = "BufReadPre"
|
||||||
}, {'p00f/nvim-ts-rainbow', event = "BufReadPre"}, -- rainbow brackets using treesitter
|
}, { 'p00f/nvim-ts-rainbow', event = "BufReadPre" }, -- rainbow brackets using treesitter
|
||||||
{'JoosepAlviste/nvim-ts-context-commentstring', event = "BufReadPre"}, -- improves commenting plugin above by using ts
|
{ 'JoosepAlviste/nvim-ts-context-commentstring', event = "BufReadPre" }, -- improves commenting plugin above by using ts
|
||||||
{
|
{
|
||||||
'lewis6991/spellsitter.nvim', -- uses treesitter to highlight spelling errors
|
'lewis6991/spellsitter.nvim', -- uses treesitter to highlight spelling errors
|
||||||
config = function() require('spellsitter').setup() end,
|
config = function() require('spellsitter').setup() end,
|
||||||
event = "BufReadPre"
|
event = "BufReadPre"
|
||||||
}, -- lsp
|
}, -- lsp
|
||||||
{'neovim/nvim-lspconfig', event = "VeryLazy"}, -- some common language server configurations
|
|
||||||
{
|
{
|
||||||
'simrat39/symbols-outline.nvim',
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
config = function() require('symbols-outline').setup() end,
|
|
||||||
event = "VeryLazy"
|
|
||||||
}, -- vista-like outline view for code
|
|
||||||
{'ray-x/lsp_signature.nvim', event = "VeryLazy"},
|
|
||||||
{'ray-x/guihua.lua', build = 'cd lua/fzy && make', event = "VeryLazy"}, {
|
|
||||||
'ray-x/navigator.lua',
|
|
||||||
config = function() require('plug._lsp') end,
|
|
||||||
event = "VeryLazy"
|
|
||||||
}, -- and completion
|
|
||||||
{
|
|
||||||
'hrsh7th/nvim-cmp', -- simple completion engine built specifically for nvim and lsp
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'onsails/lspkind-nvim', 'andersevenrud/cmp-tmux', -- completion source from adjacent tmux panes
|
"neovim/nvim-lspconfig", "williamboman/mason.nvim",
|
||||||
'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-path',
|
"williamboman/mason-lspconfig.nvim", "hrsh7th/nvim-cmp",
|
||||||
'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-vsnip', 'hrsh7th/cmp-nvim-lua',
|
"hrsh7th/cmp-buffer", "hrsh7th/cmp-path",
|
||||||
'kdheepak/cmp-latex-symbols', 'ray-x/cmp-treesitter',
|
"saadparwaiz1/cmp_luasnip", "hrsh7th/cmp-nvim-lsp",
|
||||||
'f3fora/cmp-spell', 'cbarrete/completion-vcard'
|
"hrsh7th/cmp-nvim-lua", "L3MON4D3/LuaSnip",
|
||||||
|
"rafamadriz/friendly-snippets", "andersevenrud/cmp-tmux",
|
||||||
|
"hrsh7th/cmp-nvim-lsp", "kdheepak/cmp-latex-symbols",
|
||||||
|
"ray-x/cmp-treesitter", "f3fora/cmp-spell", "hrsh7th/cmp-cmdline",
|
||||||
|
"cbarrete/completion-vcard", {
|
||||||
|
'aspeddro/cmp-pandoc.nvim',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim', 'jbyuki/nabla.nvim' },
|
||||||
|
event = "InsertEnter"
|
||||||
|
}, { "lukas-reineke/lsp-format.nvim", config = true }
|
||||||
},
|
},
|
||||||
event = "VeryLazy",
|
|
||||||
config = function() require('plug._cmp') end
|
config = function() require('plug._cmp') end
|
||||||
}, {
|
}, { 'simrat39/symbols-outline.nvim', config = true, event = "VeryLazy" }, -- vista-like outline view for code
|
||||||
'aspeddro/cmp-pandoc.nvim',
|
{ 'ray-x/lsp_signature.nvim', event = "VeryLazy" },
|
||||||
dependencies = {'nvim-lua/plenary.nvim', 'jbyuki/nabla.nvim'},
|
{ 'ray-x/guihua.lua', build = 'cd lua/fzy && make', event = "VeryLazy" }, {
|
||||||
event = "VeryLazy"
|
'ray-x/navigator.lua',
|
||||||
}, {
|
config = function() require('plug._lsp') end,
|
||||||
|
event = "VeryLazy"
|
||||||
|
}, -- and completion
|
||||||
|
{
|
||||||
"jghauser/papis.nvim",
|
"jghauser/papis.nvim",
|
||||||
after = {"telescope.nvim", "nvim-cmp"},
|
after = { "telescope.nvim", "nvim-cmp" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"kkharji/sqlite.lua", "nvim-lua/plenary.nvim",
|
"kkharji/sqlite.lua", "nvim-lua/plenary.nvim",
|
||||||
"MunifTanjim/nui.nvim", "nvim-treesitter/nvim-treesitter"
|
"MunifTanjim/nui.nvim", "nvim-treesitter/nvim-treesitter"
|
||||||
},
|
},
|
||||||
event = "VeryLazy",
|
ft = writing_ft,
|
||||||
rocks = {"lyaml"},
|
rocks = { "lyaml" },
|
||||||
config = function() require("papis").setup({}) end
|
config = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue