dotfiles/home/.config/lvim/lua/user/plugins.lua

125 lines
2.9 KiB
Lua
Raw Normal View History

2022-10-29 18:25:42 +00:00
lvim.plugins = {
-- LSP
2022-11-19 21:11:47 +00:00
2022-10-29 18:25:42 +00:00
{
-- Tree-like view for symbols in current file using LSP
"simrat39/symbols-outline.nvim",
config = function()
require("symbols-outline").setup {
width = 18,
autofold_depth = 1,
}
end,
},
{
-- Show function signature while typing
"ray-x/lsp_signature.nvim",
config = function()
require("lsp_signature").on_attach()
end,
event = "BufRead",
},
-- User interface
2022-11-19 21:11:47 +00:00
-- Autocompletion
2022-10-29 18:25:42 +00:00
{
2022-11-19 21:11:47 +00:00
-- Local AI completion helper
"tzachar/cmp-tabnine",
run = "./install.sh",
requires = "hrsh7th/nvim-cmp",
2022-10-29 18:25:42 +00:00
},
2022-11-07 21:50:23 +00:00
-- {
2022-11-19 21:11:47 +00:00
-- -- Github copilot for code completion
2022-11-07 21:50:23 +00:00
-- "zbirenbaum/copilot.lua",
-- event = { "VimEnter" },
-- config = function()
-- vim.defer_fn(function()
-- require("copilot").setup()
-- end, 100)
-- end,
-- },
2022-11-19 21:11:47 +00:00
-- {
-- -- Github compilot cmp source
-- "zbirenbaum/copilot-cmp",
-- after = { "copilot.lua", "nvim-cmp" }
-- },
2022-10-29 18:25:42 +00:00
-- Treesitter
2022-11-19 21:11:47 +00:00
2022-10-29 18:25:42 +00:00
-- {
-- -- Colorize matching parenthesis using treesitter
-- "p00f/nvim-ts-rainbow",
-- },
2022-11-19 21:11:47 +00:00
2022-10-29 18:25:42 +00:00
{
-- Treesitter information shown directly in neovim
"nvim-treesitter/playground",
},
2022-11-19 21:11:47 +00:00
2022-10-29 18:25:42 +00:00
{
-- Alwats show class/function name we're in
"romgrk/nvim-treesitter-context",
config = function()
require("treesitter-context").setup {
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
throttle = true, -- Throttles plugin updates (may improve performance)
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
patterns = { -- Match patterns for TS nodes. These get wrapped to match at word boundaries.
-- For all filetypes
-- Note that setting an entry here replaces all other patterns for this entry.
-- By setting the 'default' entry below, you can control which nodes you want to
-- appear in the context window.
default = {
"class",
"function",
"method",
"while",
"for",
"if",
"switch",
"case",
},
},
}
end,
},
2022-11-19 21:11:47 +00:00
-- Other
{
-- Code time & habit tracking
"wakatime/vim-wakatime"
},
{
-- Make clipboard work on wayland (using wl-copy)
"jasonccox/vim-wayland-clipboard"
},
{
-- eww configuration language support
"elkowar/yuck.vim"
},
{
-- Goto preview (definition/implementation/references)
"rmagatti/goto-preview",
config = function()
require('goto-preview').setup {}
end
},
2022-10-29 18:25:42 +00:00
}
-- Register copilot as cmp source
2022-11-07 21:50:23 +00:00
-- lvim.builtin.cmp.formatting.source_names["copilot"] = "(Copilot)"
-- table.insert(lvim.builtin.cmp.sources, 1, { name = "copilot" })
2022-11-19 21:11:47 +00:00
-- Register tabnine as cmp source
lvim.builtin.cmp.formatting.source_names["tabnine"] = "(Tabnine)"
table.insert(lvim.builtin.cmp.sources, { name = "tabnine" })