|
|
|
@ -114,9 +114,7 @@ vim.o.showmode = false
|
|
|
|
|
-- Schedule the setting after `UiEnter` because it can increase startup-time.
|
|
|
|
|
-- Remove this option if you want your OS clipboard to remain independent.
|
|
|
|
|
-- See `:help 'clipboard'`
|
|
|
|
|
vim.schedule(function()
|
|
|
|
|
vim.o.clipboard = 'unnamedplus'
|
|
|
|
|
end)
|
|
|
|
|
vim.schedule(function() vim.o.clipboard = 'unnamedplus' end)
|
|
|
|
|
|
|
|
|
|
-- Enable break indent
|
|
|
|
|
vim.o.breakindent = true
|
|
|
|
@ -214,9 +212,7 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
|
|
|
|
|
vim.api.nvim_create_autocmd('TextYankPost', {
|
|
|
|
|
desc = 'Highlight when yanking (copying) text',
|
|
|
|
|
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
|
|
|
|
callback = function()
|
|
|
|
|
vim.hl.on_yank()
|
|
|
|
|
end,
|
|
|
|
|
callback = function() vim.hl.on_yank() end,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
-- [[ Install `lazy.nvim` plugin manager ]]
|
|
|
|
@ -247,7 +243,7 @@ rtp:prepend(lazypath)
|
|
|
|
|
-- NOTE: Here is where you install your plugins.
|
|
|
|
|
require('lazy').setup({
|
|
|
|
|
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
|
|
|
|
|
'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically
|
|
|
|
|
{ 'NMAC427/guess-indent.nvim', opts = {} }, -- Detect tabstop and shiftwidth automatically
|
|
|
|
|
|
|
|
|
|
-- NOTE: Plugins can also be added by using a table,
|
|
|
|
|
-- with the first argument being the link and the following
|
|
|
|
@ -267,19 +263,26 @@ require('lazy').setup({
|
|
|
|
|
-- end,
|
|
|
|
|
-- }
|
|
|
|
|
--
|
|
|
|
|
-- For plugins written in VimScript, use `init = function() ... end` to set
|
|
|
|
|
-- configuration options, usually in the format `vim.g.*`. This can also
|
|
|
|
|
-- contain conditionals or any other setup logic you need for the plugin.
|
|
|
|
|
--
|
|
|
|
|
-- Here is a more advanced example where we pass configuration
|
|
|
|
|
-- options to `gitsigns.nvim`.
|
|
|
|
|
--
|
|
|
|
|
-- See `:help gitsigns` to understand what the configuration keys do
|
|
|
|
|
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
|
|
|
|
|
'lewis6991/gitsigns.nvim',
|
|
|
|
|
---@module 'gitsigns'
|
|
|
|
|
---@type Gitsigns.Config
|
|
|
|
|
---@diagnostic disable-next-line: missing-fields
|
|
|
|
|
opts = {
|
|
|
|
|
signs = {
|
|
|
|
|
add = { text = '+' },
|
|
|
|
|
change = { text = '~' },
|
|
|
|
|
delete = { text = '_' },
|
|
|
|
|
topdelete = { text = '‾' },
|
|
|
|
|
changedelete = { text = '~' },
|
|
|
|
|
add = { text = '+' }, ---@diagnostic disable-line: missing-fields
|
|
|
|
|
change = { text = '~' }, ---@diagnostic disable-line: missing-fields
|
|
|
|
|
delete = { text = '_' }, ---@diagnostic disable-line: missing-fields
|
|
|
|
|
topdelete = { text = '‾' }, ---@diagnostic disable-line: missing-fields
|
|
|
|
|
changedelete = { text = '~' }, ---@diagnostic disable-line: missing-fields
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
@ -301,6 +304,9 @@ require('lazy').setup({
|
|
|
|
|
{ -- Useful plugin to show you pending keybinds.
|
|
|
|
|
'folke/which-key.nvim',
|
|
|
|
|
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
|
|
|
|
---@module 'which-key'
|
|
|
|
|
---@type wk.Opts
|
|
|
|
|
---@diagnostic disable-next-line: missing-fields
|
|
|
|
|
opts = {
|
|
|
|
|
-- delay between pressing a key and opening which-key (milliseconds)
|
|
|
|
|
-- this setting is independent of vim.o.timeoutlen
|
|
|
|
@ -344,7 +350,7 @@ require('lazy').setup({
|
|
|
|
|
|
|
|
|
|
-- Document existing key chains
|
|
|
|
|
spec = {
|
|
|
|
|
{ '<leader>s', group = '[S]earch' },
|
|
|
|
|
{ '<leader>s', group = '[S]earch', mode = { 'n', 'v' } },
|
|
|
|
|
{ '<leader>t', group = '[T]oggle' },
|
|
|
|
|
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } },
|
|
|
|
|
},
|
|
|
|
@ -372,9 +378,7 @@ require('lazy').setup({
|
|
|
|
|
|
|
|
|
|
-- `cond` is a condition used to determine whether this plugin should be
|
|
|
|
|
-- installed and loaded.
|
|
|
|
|
cond = function()
|
|
|
|
|
return vim.fn.executable 'make' == 1
|
|
|
|
|
end,
|
|
|
|
|
cond = function() return vim.fn.executable 'make' == 1 end,
|
|
|
|
|
},
|
|
|
|
|
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
|
|
|
|
|
|
|
|
@ -430,7 +434,7 @@ require('lazy').setup({
|
|
|
|
|
vim.keymap.set('n', '<leader>sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' })
|
|
|
|
|
vim.keymap.set('n', '<leader>sf', builtin.find_files, { desc = '[S]earch [F]iles' })
|
|
|
|
|
vim.keymap.set('n', '<leader>ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' })
|
|
|
|
|
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
|
|
|
|
|
vim.keymap.set({ 'n', 'v' }, '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
|
|
|
|
|
vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
|
|
|
|
|
vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
|
|
|
|
|
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' })
|
|
|
|
@ -448,17 +452,20 @@ require('lazy').setup({
|
|
|
|
|
|
|
|
|
|
-- It's also possible to pass additional configuration options.
|
|
|
|
|
-- See `:help telescope.builtin.live_grep()` for information about particular keys
|
|
|
|
|
vim.keymap.set('n', '<leader>s/', function()
|
|
|
|
|
builtin.live_grep {
|
|
|
|
|
grep_open_files = true,
|
|
|
|
|
prompt_title = 'Live Grep in Open Files',
|
|
|
|
|
}
|
|
|
|
|
end, { desc = '[S]earch [/] in Open Files' })
|
|
|
|
|
vim.keymap.set(
|
|
|
|
|
'n',
|
|
|
|
|
'<leader>s/',
|
|
|
|
|
function()
|
|
|
|
|
builtin.live_grep {
|
|
|
|
|
grep_open_files = true,
|
|
|
|
|
prompt_title = 'Live Grep in Open Files',
|
|
|
|
|
}
|
|
|
|
|
end,
|
|
|
|
|
{ desc = '[S]earch [/] in Open Files' }
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
-- Shortcut for searching your Neovim configuration files
|
|
|
|
|
vim.keymap.set('n', '<leader>sn', function()
|
|
|
|
|
builtin.find_files { cwd = vim.fn.stdpath 'config' }
|
|
|
|
|
end, { desc = '[S]earch [N]eovim files' })
|
|
|
|
|
vim.keymap.set('n', '<leader>sn', function() builtin.find_files { cwd = vim.fn.stdpath 'config' } end, { desc = '[S]earch [N]eovim files' })
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -468,6 +475,9 @@ require('lazy').setup({
|
|
|
|
|
-- used for completion, annotations and signatures of Neovim apis
|
|
|
|
|
'folke/lazydev.nvim',
|
|
|
|
|
ft = 'lua',
|
|
|
|
|
---@module 'lazydev'
|
|
|
|
|
---@type lazydev.Config
|
|
|
|
|
---@diagnostic disable-next-line: missing-fields
|
|
|
|
|
opts = {
|
|
|
|
|
library = {
|
|
|
|
|
-- Load luvit types when the `vim.uv` word is found
|
|
|
|
@ -482,7 +492,13 @@ require('lazy').setup({
|
|
|
|
|
-- 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.
|
|
|
|
|
-- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
|
|
|
|
|
{ 'mason-org/mason.nvim', opts = {} },
|
|
|
|
|
{
|
|
|
|
|
'mason-org/mason.nvim',
|
|
|
|
|
---@module 'mason.settings'
|
|
|
|
|
---@type MasonSettings
|
|
|
|
|
---@diagnostic disable-next-line: missing-fields
|
|
|
|
|
opts = {},
|
|
|
|
|
},
|
|
|
|
|
'mason-org/mason-lspconfig.nvim',
|
|
|
|
|
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
|
|
|
|
|
|
|
|
@ -572,6 +588,9 @@ require('lazy').setup({
|
|
|
|
|
-- the definition of its *type*, not where it was *defined*.
|
|
|
|
|
map('grt', require('telescope.builtin').lsp_type_definitions, '[G]oto [T]ype Definition')
|
|
|
|
|
|
|
|
|
|
-- Toggle to show/hide diagnostic messages
|
|
|
|
|
map('<leader>td', function() vim.diagnostic.enable(not vim.diagnostic.is_enabled()) end, '[T]oggle [D]iagnostics')
|
|
|
|
|
|
|
|
|
|
-- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10)
|
|
|
|
|
---@param client vim.lsp.Client
|
|
|
|
|
---@param method vim.lsp.protocol.Method
|
|
|
|
@ -619,9 +638,7 @@ require('lazy').setup({
|
|
|
|
|
--
|
|
|
|
|
-- This may be unwanted, since they displace some of your code
|
|
|
|
|
if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) then
|
|
|
|
|
map('<leader>th', function()
|
|
|
|
|
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf })
|
|
|
|
|
end, '[T]oggle Inlay [H]ints')
|
|
|
|
|
map('<leader>th', function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf }) end, '[T]oggle Inlay [H]ints')
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
})
|
|
|
|
@ -631,7 +648,6 @@ require('lazy').setup({
|
|
|
|
|
vim.diagnostic.config {
|
|
|
|
|
severity_sort = true,
|
|
|
|
|
float = { border = 'rounded', source = 'if_many' },
|
|
|
|
|
underline = { severity = vim.diagnostic.severity.ERROR },
|
|
|
|
|
signs = vim.g.have_nerd_font and {
|
|
|
|
|
text = {
|
|
|
|
|
[vim.diagnostic.severity.ERROR] = ' ',
|
|
|
|
@ -643,61 +659,76 @@ require('lazy').setup({
|
|
|
|
|
virtual_text = {
|
|
|
|
|
source = 'if_many',
|
|
|
|
|
spacing = 2,
|
|
|
|
|
format = function(diagnostic)
|
|
|
|
|
local diagnostic_message = {
|
|
|
|
|
[vim.diagnostic.severity.ERROR] = diagnostic.message,
|
|
|
|
|
[vim.diagnostic.severity.WARN] = diagnostic.message,
|
|
|
|
|
[vim.diagnostic.severity.INFO] = diagnostic.message,
|
|
|
|
|
[vim.diagnostic.severity.HINT] = diagnostic.message,
|
|
|
|
|
}
|
|
|
|
|
return diagnostic_message[diagnostic.severity]
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
-- Display multiline diagnostics as virtual lines
|
|
|
|
|
-- virtual_lines = true,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-- LSP servers and clients are able to communicate to each other what features they support.
|
|
|
|
|
-- By default, Neovim doesn't support everything that is in the LSP specification.
|
|
|
|
|
-- When you add blink.cmp, luasnip, etc. Neovim now has *more* capabilities.
|
|
|
|
|
-- So, we create new capabilities with blink.cmp, and then broadcast that to the servers.
|
|
|
|
|
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
|
|
|
|
|
|
|
|
|
-- Enable the following language servers
|
|
|
|
|
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
|
|
|
|
-- NOTE: The following line is now commented as blink.cmp extends capabilites by default from its internal code:
|
|
|
|
|
-- https://github.com/Saghen/blink.cmp/blob/102db2f5996a46818661845cf283484870b60450/plugin/blink-cmp.lua
|
|
|
|
|
-- It has been left here as a comment for educational purposes (as the predecessor completion plugin required this explicit step).
|
|
|
|
|
--
|
|
|
|
|
-- Add any additional override configuration in the following tables. Available keys are:
|
|
|
|
|
-- - cmd (table): Override the default command used to start the server
|
|
|
|
|
-- - filetypes (table): Override the default list of associated filetypes for the server
|
|
|
|
|
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
|
|
|
|
|
-- - settings (table): Override the default settings passed when initializing the server.
|
|
|
|
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
|
|
|
|
-- local capabilities = require("blink.cmp").get_lsp_capabilities()
|
|
|
|
|
|
|
|
|
|
-- Language servers can broadly be installed in the following ways:
|
|
|
|
|
-- 1) via the mason package manager; or
|
|
|
|
|
-- 2) via your system's package manager; or
|
|
|
|
|
-- 3) via a release binary from a language server's repo that's accessible somewhere on your system.
|
|
|
|
|
|
|
|
|
|
-- The servers table comprises of the following sub-tables:
|
|
|
|
|
-- 1. mason
|
|
|
|
|
-- 2. others
|
|
|
|
|
-- Both these tables have an identical structure of language server names as keys and
|
|
|
|
|
-- a table of language server configuration as values.
|
|
|
|
|
---@class LspServersConfig
|
|
|
|
|
---@field mason table<string, vim.lsp.Config>
|
|
|
|
|
---@field others table<string, vim.lsp.Config>
|
|
|
|
|
local servers = {
|
|
|
|
|
-- clangd = {},
|
|
|
|
|
-- gopls = {},
|
|
|
|
|
-- pyright = {},
|
|
|
|
|
-- rust_analyzer = {},
|
|
|
|
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
|
|
|
|
--
|
|
|
|
|
-- Some languages (like typescript) have entire language plugins that can be useful:
|
|
|
|
|
-- https://github.com/pmizio/typescript-tools.nvim
|
|
|
|
|
--
|
|
|
|
|
-- But for many setups, the LSP (`ts_ls`) will work just fine
|
|
|
|
|
-- ts_ls = {},
|
|
|
|
|
-- Add any additional override configuration in any of the following tables. Available keys are:
|
|
|
|
|
-- - cmd (table): Override the default command used to start the server
|
|
|
|
|
-- - filetypes (table): Override the default list of associated filetypes for the server
|
|
|
|
|
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
|
|
|
|
|
-- - settings (table): Override the default settings passed when initializing the server.
|
|
|
|
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
lua_ls = {
|
|
|
|
|
-- cmd = { ... },
|
|
|
|
|
-- filetypes = { ... },
|
|
|
|
|
-- capabilities = {},
|
|
|
|
|
settings = {
|
|
|
|
|
Lua = {
|
|
|
|
|
completion = {
|
|
|
|
|
callSnippet = 'Replace',
|
|
|
|
|
-- Feel free to add/remove any LSPs here that you want to install via Mason. They will automatically be installed and setup.
|
|
|
|
|
mason = {
|
|
|
|
|
-- clangd = {},
|
|
|
|
|
-- gopls = {},
|
|
|
|
|
-- pyright = {},
|
|
|
|
|
-- rust_analyzer = {},
|
|
|
|
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
|
|
|
|
--
|
|
|
|
|
-- Some languages (like typescript) have entire language plugins that can be useful:
|
|
|
|
|
-- https://github.com/pmizio/typescript-tools.nvim
|
|
|
|
|
--
|
|
|
|
|
-- But for many setups, the LSP (`ts_ls`) will work just fine
|
|
|
|
|
-- ts_ls = {},
|
|
|
|
|
--
|
|
|
|
|
lua_ls = {
|
|
|
|
|
-- cmd = { ... },
|
|
|
|
|
-- filetypes = { ... },
|
|
|
|
|
-- capabilities = {},
|
|
|
|
|
settings = {
|
|
|
|
|
Lua = {
|
|
|
|
|
completion = {
|
|
|
|
|
callSnippet = 'Replace',
|
|
|
|
|
},
|
|
|
|
|
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
|
|
|
|
|
-- diagnostics = { disable = { 'missing-fields' } },
|
|
|
|
|
},
|
|
|
|
|
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
|
|
|
|
|
-- diagnostics = { disable = { 'missing-fields' } },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
-- This table contains config for all language servers that are *not* installed via Mason.
|
|
|
|
|
-- Structure is identical to the mason table from above.
|
|
|
|
|
others = {
|
|
|
|
|
-- dartls = {},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-- Ensure the servers and tools above are installed
|
|
|
|
@ -713,26 +744,31 @@ require('lazy').setup({
|
|
|
|
|
--
|
|
|
|
|
-- You can add other tools here that you want Mason to install
|
|
|
|
|
-- for you, so that they are available from within Neovim.
|
|
|
|
|
local ensure_installed = vim.tbl_keys(servers or {})
|
|
|
|
|
local ensure_installed = vim.tbl_keys(servers.mason or {})
|
|
|
|
|
vim.list_extend(ensure_installed, {
|
|
|
|
|
'stylua', -- Used to format Lua code
|
|
|
|
|
})
|
|
|
|
|
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
|
|
|
|
|
|
|
|
|
-- Either merge all additional server configs from the `servers.mason` and `servers.others` tables
|
|
|
|
|
-- to the default language server configs as provided by nvim-lspconfig or
|
|
|
|
|
-- define a custom server config that's unavailable on nvim-lspconfig.
|
|
|
|
|
for server, config in pairs(vim.tbl_extend('keep', servers.mason, servers.others)) do
|
|
|
|
|
if not vim.tbl_isempty(config) then
|
|
|
|
|
vim.lsp.config(server, config)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- After configuring our language servers, we now enable them
|
|
|
|
|
require('mason-lspconfig').setup {
|
|
|
|
|
ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
|
|
|
|
|
automatic_installation = false,
|
|
|
|
|
handlers = {
|
|
|
|
|
function(server_name)
|
|
|
|
|
local server = servers[server_name] or {}
|
|
|
|
|
-- This handles overriding only values explicitly passed
|
|
|
|
|
-- by the server configuration above. Useful when disabling
|
|
|
|
|
-- certain features of an LSP (for example, turning off formatting for ts_ls)
|
|
|
|
|
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
|
|
|
|
require('lspconfig')[server_name].setup(server)
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
automatic_enable = true, -- automatically run vim.lsp.enable() for all servers that are installed via Mason
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-- Manually run vim.lsp.enable for all language servers that are *not* installed via Mason
|
|
|
|
|
if not vim.tbl_isempty(servers.others) then
|
|
|
|
|
vim.lsp.enable(vim.tbl_keys(servers.others))
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -743,13 +779,13 @@ require('lazy').setup({
|
|
|
|
|
keys = {
|
|
|
|
|
{
|
|
|
|
|
'<leader>f',
|
|
|
|
|
function()
|
|
|
|
|
require('conform').format { async = true, lsp_format = 'fallback' }
|
|
|
|
|
end,
|
|
|
|
|
function() require('conform').format { async = true, lsp_format = 'fallback' } end,
|
|
|
|
|
mode = '',
|
|
|
|
|
desc = '[F]ormat buffer',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
---@module 'conform'
|
|
|
|
|
---@type conform.setupOpts
|
|
|
|
|
opts = {
|
|
|
|
|
notify_on_error = false,
|
|
|
|
|
format_on_save = function(bufnr)
|
|
|
|
@ -810,8 +846,8 @@ require('lazy').setup({
|
|
|
|
|
},
|
|
|
|
|
'folke/lazydev.nvim',
|
|
|
|
|
},
|
|
|
|
|
--- @module 'blink.cmp'
|
|
|
|
|
--- @type blink.cmp.Config
|
|
|
|
|
---@module 'blink.cmp'
|
|
|
|
|
---@type blink.cmp.Config
|
|
|
|
|
opts = {
|
|
|
|
|
keymap = {
|
|
|
|
|
-- 'default' (recommended) for mappings similar to built-in completions
|
|
|
|
@ -899,7 +935,15 @@ require('lazy').setup({
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
-- Highlight todo, notes, etc in comments
|
|
|
|
|
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
|
|
|
|
|
{
|
|
|
|
|
'folke/todo-comments.nvim',
|
|
|
|
|
event = 'VimEnter',
|
|
|
|
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
|
|
|
|
---@module 'todo-comments'
|
|
|
|
|
---@type TodoOptions
|
|
|
|
|
---@diagnostic disable-next-line: missing-fields
|
|
|
|
|
opts = { signs = false },
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{ -- Collection of various small independent plugins/modules
|
|
|
|
|
'echasnovski/mini.nvim',
|
|
|
|
@ -930,9 +974,7 @@ require('lazy').setup({
|
|
|
|
|
-- default behavior. For example, here we set the section for
|
|
|
|
|
-- cursor location to LINE:COLUMN
|
|
|
|
|
---@diagnostic disable-next-line: duplicate-set-field
|
|
|
|
|
statusline.section_location = function()
|
|
|
|
|
return '%2l:%-2v'
|
|
|
|
|
end
|
|
|
|
|
statusline.section_location = function() return '%2l:%-2v' end
|
|
|
|
|
|
|
|
|
|
-- ... and there is more!
|
|
|
|
|
-- Check out: https://github.com/echasnovski/mini.nvim
|
|
|
|
@ -943,6 +985,9 @@ require('lazy').setup({
|
|
|
|
|
build = ':TSUpdate',
|
|
|
|
|
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
|
|
|
|
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
|
|
|
|
---@module 'nvim-treesitter'
|
|
|
|
|
---@type TSConfig
|
|
|
|
|
---@diagnostic disable-next-line: missing-fields
|
|
|
|
|
opts = {
|
|
|
|
|
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
|
|
|
|
|
-- Autoinstall languages that are not installed
|
|
|
|
@ -990,7 +1035,7 @@ require('lazy').setup({
|
|
|
|
|
-- Or use telescope!
|
|
|
|
|
-- In normal mode type `<space>sh` then write `lazy.nvim-plugin`
|
|
|
|
|
-- you can continue same window with `<space>sr` which resumes last telescope search
|
|
|
|
|
}, {
|
|
|
|
|
}, { ---@diagnostic disable-line: missing-fields
|
|
|
|
|
ui = {
|
|
|
|
|
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
|
|
|
|
-- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table
|
|
|
|
|