|
|
@ -76,6 +76,8 @@ require('lazy').setup({
|
|
|
|
require 'plugins.alpha',
|
|
|
|
require 'plugins.alpha',
|
|
|
|
require 'plugins.autotag',
|
|
|
|
require 'plugins.autotag',
|
|
|
|
require 'plugins.colorizer',
|
|
|
|
require 'plugins.colorizer',
|
|
|
|
|
|
|
|
require 'plugins.fugitive',
|
|
|
|
|
|
|
|
require 'plugins.rhubarb',
|
|
|
|
|
|
|
|
|
|
|
|
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
|
|
|
|
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
|
|
|
|
--
|
|
|
|
--
|
|
|
@ -255,7 +257,11 @@ require('lazy').setup({
|
|
|
|
end,
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
-- LSP Plugins
|
|
|
|
{
|
|
|
|
|
|
|
|
-- Main LSP Configuration
|
|
|
|
|
|
|
|
'neovim/nvim-lspconfig',
|
|
|
|
|
|
|
|
dependencies = {
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
|
|
|
|
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
|
|
|
|
-- used for completion, annotations and signatures of Neovim apis
|
|
|
|
-- used for completion, annotations and signatures of Neovim apis
|
|
|
@ -268,10 +274,7 @@ require('lazy').setup({
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
|
|
|
|
-- Main LSP Configuration
|
|
|
|
|
|
|
|
'neovim/nvim-lspconfig',
|
|
|
|
|
|
|
|
dependencies = {
|
|
|
|
|
|
|
|
-- Automatically install LSPs and related tools to stdpath for Neovim
|
|
|
|
-- Automatically install LSPs and related tools to stdpath for Neovim
|
|
|
|
-- Mason must be loaded before its dependents so we need to set it up here.
|
|
|
|
-- Mason must be loaded before its dependents so we need to set it up here.
|
|
|
|
-- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
|
|
|
|
-- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
|
|
|
@ -284,6 +287,7 @@ require('lazy').setup({
|
|
|
|
|
|
|
|
|
|
|
|
-- Allows extra capabilities provided by blink.cmp
|
|
|
|
-- Allows extra capabilities provided by blink.cmp
|
|
|
|
'saghen/blink.cmp',
|
|
|
|
'saghen/blink.cmp',
|
|
|
|
|
|
|
|
{ 'https://git.sr.ht/~whynothugo/lsp_lines.nvim' },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
config = function()
|
|
|
|
config = function()
|
|
|
|
-- Brief aside: **What is LSP?**
|
|
|
|
-- Brief aside: **What is LSP?**
|
|
|
@ -348,7 +352,7 @@ require('lazy').setup({
|
|
|
|
-- To jump back, press <C-t>.
|
|
|
|
-- To jump back, press <C-t>.
|
|
|
|
map('grd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
|
|
|
|
map('grd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
|
|
|
|
|
|
|
|
|
|
|
|
-- WARN: This is not Goto Definition, this is Goto Declaration.
|
|
|
|
-- WARN: This is not Goto De
|
|
|
|
-- For example, in C this would take you to the header.
|
|
|
|
-- For example, in C this would take you to the header.
|
|
|
|
map('grD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
|
|
|
map('grD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
|
|
|
|
|
|
|
|
|
|
|
@ -477,7 +481,6 @@ require('lazy').setup({
|
|
|
|
-- But for many setups, the LSP (`ts_ls`) will work just fine
|
|
|
|
-- But for many setups, the LSP (`ts_ls`) will work just fine
|
|
|
|
-- ts_ls = {},
|
|
|
|
-- ts_ls = {},
|
|
|
|
--
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
|
|
lua_ls = {
|
|
|
|
lua_ls = {
|
|
|
|
-- cmd = { ... },
|
|
|
|
-- cmd = { ... },
|
|
|
|
-- filetypes = { ... },
|
|
|
|
-- filetypes = { ... },
|
|
|
@ -488,7 +491,7 @@ require('lazy').setup({
|
|
|
|
callSnippet = 'Replace',
|
|
|
|
callSnippet = 'Replace',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
|
|
|
|
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
|
|
|
|
-- diagnostics = { disable = { 'missing-fields' } },
|
|
|
|
-- diagnostics = { disable = { 'missing-fields' } }, },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -527,6 +530,18 @@ require('lazy').setup({
|
|
|
|
end,
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
require('lsp_lines').setup()
|
|
|
|
|
|
|
|
vim.diagnostic.config { virtual_text = true, virtual_lines = false }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vim.keymap.set('', '<leader>l', function()
|
|
|
|
|
|
|
|
local config = vim.diagnostic.config() or {}
|
|
|
|
|
|
|
|
if config.virtual_text then
|
|
|
|
|
|
|
|
vim.diagnostic.config { virtual_text = false, virtual_lines = true }
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
vim.diagnostic.config { virtual_text = true, virtual_lines = false }
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end, { desc = 'Toggle lsp_lines' })
|
|
|
|
end,
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
@ -770,10 +785,7 @@ require('lazy').setup({
|
|
|
|
--
|
|
|
|
--
|
|
|
|
-- require 'kickstart.plugins.debug',
|
|
|
|
-- require 'kickstart.plugins.debug',
|
|
|
|
-- require 'kickstart.plugins.indent_line',
|
|
|
|
-- require 'kickstart.plugins.indent_line',
|
|
|
|
-- require 'kickstart.plugins.lint',
|
|
|
|
require 'kickstart.plugins.lint',
|
|
|
|
-- require 'kickstart.plugins.autopairs',
|
|
|
|
|
|
|
|
-- require 'kickstart.plugins.neo-tree',
|
|
|
|
|
|
|
|
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
|
|
|
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
|
|
|
-- This is the easiest way to modularize your config.
|
|
|
|
-- This is the easiest way to modularize your config.
|
|
|
|