|
|
|
@ -38,7 +38,7 @@ vim.api.nvim_set_keymap('i', 'æ', '<Esc>', { noremap = true, silent = true })
|
|
|
|
|
vim.g.mapleader = ' '
|
|
|
|
|
vim.g.maplocalleader = ' '
|
|
|
|
|
|
|
|
|
|
-- Set to true if you have a Nerd Font installed
|
|
|
|
|
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
|
|
|
|
vim.g.have_nerd_font = false
|
|
|
|
|
|
|
|
|
|
-- [[ Setting options ]]
|
|
|
|
@ -59,9 +59,12 @@ vim.opt.mouse = 'a'
|
|
|
|
|
vim.opt.showmode = false
|
|
|
|
|
|
|
|
|
|
-- Sync clipboard between OS and Neovim.
|
|
|
|
|
-- 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.opt.clipboard = 'unnamedplus'
|
|
|
|
|
vim.schedule(function()
|
|
|
|
|
vim.opt.clipboard = 'unnamedplus'
|
|
|
|
|
end)
|
|
|
|
|
|
|
|
|
|
-- Enable break indent
|
|
|
|
|
vim.opt.breakindent = true
|
|
|
|
@ -105,14 +108,11 @@ vim.opt.scrolloff = 10
|
|
|
|
|
-- [[ Basic Keymaps ]]
|
|
|
|
|
-- See `:help vim.keymap.set()`
|
|
|
|
|
|
|
|
|
|
-- Set highlight on search, but clear on pressing <Esc> in normal mode
|
|
|
|
|
vim.opt.hlsearch = true
|
|
|
|
|
-- Clear highlights on search when pressing <Esc> in normal mode
|
|
|
|
|
-- See `:help hlsearch`
|
|
|
|
|
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
|
|
|
|
|
|
|
|
|
-- Diagnostic keymaps
|
|
|
|
|
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' })
|
|
|
|
|
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' })
|
|
|
|
|
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' })
|
|
|
|
|
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
|
|
|
|
|
|
|
|
|
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
|
|
|
|
@ -155,9 +155,12 @@ vim.api.nvim_create_autocmd('TextYankPost', {
|
|
|
|
|
-- [[ Install `lazy.nvim` plugin manager ]]
|
|
|
|
|
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
|
|
|
|
|
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
|
|
|
|
if not vim.loop.fs_stat(lazypath) then
|
|
|
|
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|
|
|
|
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
|
|
|
|
|
vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
|
|
|
|
|
local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
|
|
|
|
|
if vim.v.shell_error ~= 0 then
|
|
|
|
|
error('Error cloning lazy.nvim:\n' .. out)
|
|
|
|
|
end
|
|
|
|
|
end ---@diagnostic disable-next-line: undefined-field
|
|
|
|
|
vim.opt.rtp:prepend(lazypath)
|
|
|
|
|
|
|
|
|
@ -199,6 +202,7 @@ require('lazy').setup({
|
|
|
|
|
--
|
|
|
|
|
-- Use `opts = {}` to force a plugin to be loaded.
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
-- This is equivalent to:
|
|
|
|
|
-- require('Comment').setup({})
|
|
|
|
|
{
|
|
|
|
@ -266,6 +270,7 @@ require('lazy').setup({
|
|
|
|
|
-- "gc" to comment visual regions/lines
|
|
|
|
|
{ 'numToStr/Comment.nvim', opts = {} },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- better editing for directories/files etc
|
|
|
|
|
{
|
|
|
|
|
'stevearc/oil.nvim',
|
|
|
|
@ -316,25 +321,61 @@ require('lazy').setup({
|
|
|
|
|
-- which loads which-key before all the UI elements are loaded. Events can be
|
|
|
|
|
-- normal autocommands events (`:help autocmd-events`).
|
|
|
|
|
--
|
|
|
|
|
-- Then, because we use the `config` key, the configuration only runs
|
|
|
|
|
-- after the plugin has been loaded:
|
|
|
|
|
-- config = function() ... end
|
|
|
|
|
-- Then, because we use the `opts` key (recommended), the configuration runs
|
|
|
|
|
-- after the plugin has been loaded as `require(MODULE).setup(opts)`.
|
|
|
|
|
|
|
|
|
|
{ -- Useful plugin to show you pending keybinds.
|
|
|
|
|
'folke/which-key.nvim',
|
|
|
|
|
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
|
|
|
|
config = function() -- This is the function that runs, AFTER loading
|
|
|
|
|
require('which-key').setup()
|
|
|
|
|
opts = {
|
|
|
|
|
icons = {
|
|
|
|
|
-- set icon mappings to true if you have a Nerd Font
|
|
|
|
|
mappings = vim.g.have_nerd_font,
|
|
|
|
|
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
|
|
|
|
|
-- default which-key.nvim defined Nerd Font icons, otherwise define a string table
|
|
|
|
|
keys = vim.g.have_nerd_font and {} or {
|
|
|
|
|
Up = '<Up> ',
|
|
|
|
|
Down = '<Down> ',
|
|
|
|
|
Left = '<Left> ',
|
|
|
|
|
Right = '<Right> ',
|
|
|
|
|
C = '<C-…> ',
|
|
|
|
|
M = '<M-…> ',
|
|
|
|
|
D = '<D-…> ',
|
|
|
|
|
S = '<S-…> ',
|
|
|
|
|
CR = '<CR> ',
|
|
|
|
|
Esc = '<Esc> ',
|
|
|
|
|
ScrollWheelDown = '<ScrollWheelDown> ',
|
|
|
|
|
ScrollWheelUp = '<ScrollWheelUp> ',
|
|
|
|
|
NL = '<NL> ',
|
|
|
|
|
BS = '<BS> ',
|
|
|
|
|
Space = '<Space> ',
|
|
|
|
|
Tab = '<Tab> ',
|
|
|
|
|
F1 = '<F1>',
|
|
|
|
|
F2 = '<F2>',
|
|
|
|
|
F3 = '<F3>',
|
|
|
|
|
F4 = '<F4>',
|
|
|
|
|
F5 = '<F5>',
|
|
|
|
|
F6 = '<F6>',
|
|
|
|
|
F7 = '<F7>',
|
|
|
|
|
F8 = '<F8>',
|
|
|
|
|
F9 = '<F9>',
|
|
|
|
|
F10 = '<F10>',
|
|
|
|
|
F11 = '<F11>',
|
|
|
|
|
F12 = '<F12>',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
-- Document existing key chains
|
|
|
|
|
require('which-key').register {
|
|
|
|
|
['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' },
|
|
|
|
|
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
|
|
|
|
|
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
|
|
|
|
|
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
|
|
|
|
|
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
|
|
|
|
}
|
|
|
|
|
end,
|
|
|
|
|
spec = {
|
|
|
|
|
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
|
|
|
|
|
{ '<leader>d', group = '[D]ocument' },
|
|
|
|
|
{ '<leader>r', group = '[R]ename' },
|
|
|
|
|
{ '<leader>s', group = '[S]earch' },
|
|
|
|
|
{ '<leader>w', group = '[W]orkspace' },
|
|
|
|
|
{ '<leader>t', group = '[T]oggle' },
|
|
|
|
|
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
-- NOTE: Plugins can specify dependencies.
|
|
|
|
@ -449,11 +490,26 @@ require('lazy').setup({
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{ -- LSP Configuration & Plugins
|
|
|
|
|
-- LSP Plugins
|
|
|
|
|
{
|
|
|
|
|
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
|
|
|
|
|
-- used for completion, annotations and signatures of Neovim apis
|
|
|
|
|
'folke/lazydev.nvim',
|
|
|
|
|
ft = 'lua',
|
|
|
|
|
opts = {
|
|
|
|
|
library = {
|
|
|
|
|
-- Load luvit types when the `vim.uv` word is found
|
|
|
|
|
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{ 'Bilal2453/luvit-meta', lazy = true },
|
|
|
|
|
{
|
|
|
|
|
-- Main LSP Configuration
|
|
|
|
|
'neovim/nvim-lspconfig',
|
|
|
|
|
dependencies = {
|
|
|
|
|
-- Automatically install LSPs and related tools to stdpath for Neovim
|
|
|
|
|
'williamboman/mason.nvim',
|
|
|
|
|
{ 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants
|
|
|
|
|
'williamboman/mason-lspconfig.nvim',
|
|
|
|
|
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
|
|
|
|
|
|
|
|
@ -461,9 +517,8 @@ require('lazy').setup({
|
|
|
|
|
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
|
|
|
|
{ 'j-hui/fidget.nvim', opts = {} },
|
|
|
|
|
|
|
|
|
|
-- `neodev` configures Lua LSP for your Neovim config, runtime and plugins
|
|
|
|
|
-- used for completion, annotations and signatures of Neovim apis
|
|
|
|
|
{ 'folke/neodev.nvim', opts = {} },
|
|
|
|
|
-- Allows extra capabilities provided by nvim-cmp
|
|
|
|
|
'hrsh7th/cmp-nvim-lsp',
|
|
|
|
|
},
|
|
|
|
|
config = function()
|
|
|
|
|
-- Brief aside: **What is LSP?**
|
|
|
|
@ -503,8 +558,9 @@ require('lazy').setup({
|
|
|
|
|
--
|
|
|
|
|
-- In this case, we create a function that lets us more easily define mappings specific
|
|
|
|
|
-- for LSP related items. It sets the mode, buffer and description for us each time.
|
|
|
|
|
local map = function(keys, func, desc)
|
|
|
|
|
vim.keymap.set('n', keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
|
|
|
|
|
local map = function(keys, func, desc, mode)
|
|
|
|
|
mode = mode or 'n'
|
|
|
|
|
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- Jump to the definition of the word under your cursor.
|
|
|
|
@ -538,11 +594,7 @@ require('lazy').setup({
|
|
|
|
|
|
|
|
|
|
-- Execute a code action, usually your cursor needs to be on top of an error
|
|
|
|
|
-- or a suggestion from your LSP for this to activate.
|
|
|
|
|
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
|
|
|
|
|
|
|
|
|
|
-- Opens a popup that displays documentation about the word under your cursor
|
|
|
|
|
-- See `:help K` for why this keymap.
|
|
|
|
|
map('K', vim.lsp.buf.hover, 'Hover Documentation')
|
|
|
|
|
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' })
|
|
|
|
|
|
|
|
|
|
-- WARN: This is not Goto Definition, this is Goto Declaration.
|
|
|
|
|
-- For example, in C this would take you to the header.
|
|
|
|
@ -554,20 +606,51 @@ require('lazy').setup({
|
|
|
|
|
--
|
|
|
|
|
-- When you move your cursor, the highlights will be cleared (the second autocommand).
|
|
|
|
|
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
|
|
|
|
if client and client.server_capabilities.documentHighlightProvider then
|
|
|
|
|
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then
|
|
|
|
|
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false })
|
|
|
|
|
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
|
|
|
|
buffer = event.buf,
|
|
|
|
|
group = highlight_augroup,
|
|
|
|
|
callback = vim.lsp.buf.document_highlight,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
|
|
|
|
|
buffer = event.buf,
|
|
|
|
|
group = highlight_augroup,
|
|
|
|
|
callback = vim.lsp.buf.clear_references,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd('LspDetach', {
|
|
|
|
|
group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }),
|
|
|
|
|
callback = function(event2)
|
|
|
|
|
vim.lsp.buf.clear_references()
|
|
|
|
|
vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf }
|
|
|
|
|
end,
|
|
|
|
|
})
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- The following code creates a keymap to toggle inlay hints in your
|
|
|
|
|
-- code, if the language server you are using supports them
|
|
|
|
|
--
|
|
|
|
|
-- This may be unwanted, since they displace some of your code
|
|
|
|
|
if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) 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')
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
-- Change diagnostic symbols in the sign column (gutter)
|
|
|
|
|
-- if vim.g.have_nerd_font then
|
|
|
|
|
-- local signs = { ERROR = '', WARN = '', INFO = '', HINT = '' }
|
|
|
|
|
-- local diagnostic_signs = {}
|
|
|
|
|
-- for type, icon in pairs(signs) do
|
|
|
|
|
-- diagnostic_signs[vim.diagnostic.severity[type]] = icon
|
|
|
|
|
-- end
|
|
|
|
|
-- vim.diagnostic.config { signs = { text = diagnostic_signs } }
|
|
|
|
|
-- end
|
|
|
|
|
|
|
|
|
|
-- 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 nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
|
|
|
|
@ -602,13 +685,13 @@ require('lazy').setup({
|
|
|
|
|
-- 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 (`tsserver`) will work just fine
|
|
|
|
|
-- tsserver = {},
|
|
|
|
|
-- But for many setups, the LSP (`ts_ls`) will work just fine
|
|
|
|
|
-- ts_ls = {},
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
lua_ls = {
|
|
|
|
|
-- cmd = {...},
|
|
|
|
|
-- filetypes = { ...},
|
|
|
|
|
-- cmd = { ... },
|
|
|
|
|
-- filetypes = { ... },
|
|
|
|
|
-- capabilities = {},
|
|
|
|
|
settings = {
|
|
|
|
|
Lua = {
|
|
|
|
@ -644,7 +727,7 @@ require('lazy').setup({
|
|
|
|
|
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 tsserver)
|
|
|
|
|
-- 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,
|
|
|
|
@ -655,6 +738,18 @@ require('lazy').setup({
|
|
|
|
|
|
|
|
|
|
{ -- Autoformat
|
|
|
|
|
'stevearc/conform.nvim',
|
|
|
|
|
event = { 'BufWritePre' },
|
|
|
|
|
cmd = { 'ConformInfo' },
|
|
|
|
|
keys = {
|
|
|
|
|
{
|
|
|
|
|
'<leader>f',
|
|
|
|
|
function()
|
|
|
|
|
require('conform').format { async = true, lsp_format = 'fallback' }
|
|
|
|
|
end,
|
|
|
|
|
mode = '',
|
|
|
|
|
desc = '[F]ormat buffer',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
opts = {
|
|
|
|
|
notify_on_error = false,
|
|
|
|
|
keys = {
|
|
|
|
@ -673,9 +768,15 @@ require('lazy').setup({
|
|
|
|
|
-- have a well standardized coding style. You can add additional
|
|
|
|
|
-- languages here or re-enable it for the disabled ones.
|
|
|
|
|
local disable_filetypes = { c = true, cpp = true }
|
|
|
|
|
local lsp_format_opt
|
|
|
|
|
if disable_filetypes[vim.bo[bufnr].filetype] then
|
|
|
|
|
lsp_format_opt = 'never'
|
|
|
|
|
else
|
|
|
|
|
lsp_format_opt = 'fallback'
|
|
|
|
|
end
|
|
|
|
|
return {
|
|
|
|
|
timeout_ms = 500,
|
|
|
|
|
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
|
|
|
|
|
lsp_format = lsp_format_opt,
|
|
|
|
|
}
|
|
|
|
|
end,
|
|
|
|
|
formatters_by_ft = {
|
|
|
|
@ -685,9 +786,8 @@ require('lazy').setup({
|
|
|
|
|
-- Conform can also run multiple formatters sequentially
|
|
|
|
|
-- python = { "isort", "black" },
|
|
|
|
|
--
|
|
|
|
|
-- You can use a sub-list to tell conform to run *until* a formatter
|
|
|
|
|
-- is found.
|
|
|
|
|
-- javascript = { { "prettierd", "prettier" } },
|
|
|
|
|
-- You can use 'stop_after_first' to run the first available formatter from the list
|
|
|
|
|
-- javascript = { "prettierd", "prettier", stop_after_first = true },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
@ -765,6 +865,12 @@ require('lazy').setup({
|
|
|
|
|
-- This will expand snippets if the LSP sent a snippet.
|
|
|
|
|
['<C-y>'] = cmp.mapping.confirm { select = true },
|
|
|
|
|
|
|
|
|
|
-- If you prefer more traditional completion keymaps,
|
|
|
|
|
-- you can uncomment the following lines
|
|
|
|
|
--['<CR>'] = cmp.mapping.confirm { select = true },
|
|
|
|
|
--['<Tab>'] = cmp.mapping.select_next_item(),
|
|
|
|
|
--['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
|
|
|
|
|
|
|
|
|
-- Manually trigger a completion from nvim-cmp.
|
|
|
|
|
-- Generally you don't need this, because nvim-cmp will display
|
|
|
|
|
-- completions whenever it has completion options available.
|
|
|
|
@ -793,6 +899,11 @@ require('lazy').setup({
|
|
|
|
|
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
|
|
|
|
},
|
|
|
|
|
sources = {
|
|
|
|
|
{
|
|
|
|
|
name = 'lazydev',
|
|
|
|
|
-- set group index to 0 to skip loading LuaLS completions as lazydev recommends it
|
|
|
|
|
group_index = 0,
|
|
|
|
|
},
|
|
|
|
|
{ name = 'nvim_lsp' },
|
|
|
|
|
{ name = 'luasnip' },
|
|
|
|
|
{ name = 'path' },
|
|
|
|
@ -834,7 +945,7 @@ require('lazy').setup({
|
|
|
|
|
--
|
|
|
|
|
-- Examples:
|
|
|
|
|
-- - va) - [V]isually select [A]round [)]paren
|
|
|
|
|
-- - yinq - [Y]ank [I]nside [N]ext [']quote
|
|
|
|
|
-- - yinq - [Y]ank [I]nside [N]ext [Q]uote
|
|
|
|
|
-- - ci' - [C]hange [I]nside [']quote
|
|
|
|
|
require('mini.ai').setup { n_lines = 500 }
|
|
|
|
|
|
|
|
|
@ -867,8 +978,11 @@ require('lazy').setup({
|
|
|
|
|
{ -- Highlight, edit, and navigate code
|
|
|
|
|
'nvim-treesitter/nvim-treesitter',
|
|
|
|
|
build = ':TSUpdate',
|
|
|
|
|
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
|
|
|
|
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
|
|
|
|
opts = {
|
|
|
|
|
ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc', 'css', 'javascript', 'ocaml' },
|
|
|
|
|
|
|
|
|
|
ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc', 'css', 'javascript', 'ocaml', 'diff',, 'markdown_inline', 'query' },
|
|
|
|
|
-- Autoinstall languages that are not installed
|
|
|
|
|
auto_install = true,
|
|
|
|
|
highlight = {
|
|
|
|
@ -880,22 +994,15 @@ require('lazy').setup({
|
|
|
|
|
},
|
|
|
|
|
indent = { enable = true, disable = { 'ruby' } },
|
|
|
|
|
},
|
|
|
|
|
config = function(_, opts)
|
|
|
|
|
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
|
|
|
|
|
|
|
|
|
---@diagnostic disable-next-line: missing-fields
|
|
|
|
|
require('nvim-treesitter.configs').setup(opts)
|
|
|
|
|
|
|
|
|
|
-- There are additional nvim-treesitter modules that you can use to interact
|
|
|
|
|
-- with nvim-treesitter. You should go explore a few and see what interests you:
|
|
|
|
|
--
|
|
|
|
|
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
|
|
|
|
|
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
|
|
|
|
|
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
|
|
|
|
end,
|
|
|
|
|
-- There are additional nvim-treesitter modules that you can use to interact
|
|
|
|
|
-- with nvim-treesitter. You should go explore a few and see what interests you:
|
|
|
|
|
--
|
|
|
|
|
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
|
|
|
|
|
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
|
|
|
|
|
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
-- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the
|
|
|
|
|
-- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the
|
|
|
|
|
-- init.lua. If you want these files, they are in the repository, so you can just download them and
|
|
|
|
|
-- place them in the correct locations.
|
|
|
|
|
|
|
|
|
@ -907,13 +1014,25 @@ require('lazy').setup({
|
|
|
|
|
-- require 'kickstart.plugins.debug',
|
|
|
|
|
-- require 'kickstart.plugins.indent_line',
|
|
|
|
|
-- 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`
|
|
|
|
|
-- This is the easiest way to modularize your config.
|
|
|
|
|
--
|
|
|
|
|
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
|
|
|
|
|
|
|
|
|
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
|
|
|
|
|
-- { import = 'custom.plugins' }
|
|
|
|
|
|
|
|
|
|
-- { import = 'custom.plugins' },
|
|
|
|
|
--
|
|
|
|
|
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
|
|
|
|
|
-- 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
|
|
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
ui = {
|
|
|
|
|
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
|
|
|
|