Removing some unnecessary comments and lines
This commit is contained in:
parent
84120d10e8
commit
7c3a4bd063
|
|
@ -1,5 +1 @@
|
||||||
-- You can add your own plugins here or in other files in this directory!
|
|
||||||
-- I promise not to create any merge conflicts in this directory :)
|
|
||||||
--
|
|
||||||
-- See the kickstart.nvim README for more information
|
|
||||||
return {}
|
return {}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
-- mason and mason-lspconfig released version 2.0.
|
|
||||||
-- with some breaking changes, multiple methods have been changed
|
|
||||||
-- therefore (for now) a workaround is needed for Mason to still work in LazyVim
|
|
||||||
-- THIS WILL PIN the VERSION number, remove this file later, when it's no longer needed
|
|
||||||
-- https://www.reddit.com/r/neovim/comments/1kgu748/masonnvim_20_has_been_released/mr41tkr/
|
|
||||||
return {
|
|
||||||
{ "mason-org/mason.nvim", version = "1.11.0" },
|
|
||||||
{ "mason-org/mason-lspconfig.nvim", version = "1.32.0" },
|
|
||||||
}
|
|
||||||
-- after adding/saving this file run :Lazy to potentially 're-install' the versions above
|
|
||||||
|
|
@ -3,9 +3,7 @@ return {
|
||||||
---@module 'oil'
|
---@module 'oil'
|
||||||
---@type oil.SetupOpts
|
---@type oil.SetupOpts
|
||||||
opts = {},
|
opts = {},
|
||||||
-- Optional dependencies
|
|
||||||
dependencies = { { 'nvim-mini/mini.icons', opts = {} } },
|
dependencies = { { 'nvim-mini/mini.icons', opts = {} } },
|
||||||
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons
|
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons
|
||||||
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
|
|
||||||
lazy = false,
|
lazy = false,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,8 @@ return {
|
||||||
lazy = false,
|
lazy = false,
|
||||||
---@type snacks.Config
|
---@type snacks.Config
|
||||||
opts = {
|
opts = {
|
||||||
-- your configuration comes here
|
|
||||||
-- or leave it empty to use the default settings
|
|
||||||
-- refer to the configuration section below
|
|
||||||
bigfile = { enabled = true },
|
bigfile = { enabled = true },
|
||||||
--dashboard = { enabled = true },
|
|
||||||
input = { enabled = true },
|
input = { enabled = true },
|
||||||
--notifier = { enabled = true },
|
|
||||||
statuscolumn = { enabled = true },
|
statuscolumn = { enabled = true },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
return {
|
return {
|
||||||
'folke/trouble.nvim',
|
'folke/trouble.nvim',
|
||||||
opts = {}, -- for default options, refer to the configuration section for custom setup.
|
opts = {},
|
||||||
cmd = 'Trouble',
|
cmd = 'Trouble',
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
return {
|
return {
|
||||||
'windwp/nvim-ts-autotag',
|
'windwp/nvim-ts-autotag',
|
||||||
-- event = { 'BufReadPre', 'BufNewFile' },
|
-- event = { 'BufReadPre', 'BufNewFile' },
|
||||||
opts = {
|
-- opts = {
|
||||||
-- Defaults
|
-- Defaults
|
||||||
-- enable_close = true, -- Auto close tags
|
-- enable_close = true, -- Auto close tags
|
||||||
-- enable_rename = true, -- Auto rename pairs of tags
|
-- enable_rename = true, -- Auto rename pairs of tags
|
||||||
-- enable_close_on_slash = false, -- Auto close on trailing </
|
-- enable_close_on_slash = false, -- Auto close on trailing </
|
||||||
},
|
-- },
|
||||||
-- config = function(_, opts)
|
config = function(_, opts)
|
||||||
-- require('nvim-ts-autotag').setup(opts)
|
require('nvim-ts-autotag').setup(opts)
|
||||||
-- end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,6 @@ return {
|
||||||
-- For an understanding of why the 'default' preset is recommended,
|
-- For an understanding of why the 'default' preset is recommended,
|
||||||
-- you will need to read `:help ins-completion`
|
-- you will need to read `:help ins-completion`
|
||||||
--
|
--
|
||||||
-- No, but seriously. Please read `:help ins-completion`, it is really good!
|
|
||||||
--
|
|
||||||
-- All presets have the following mappings:
|
-- All presets have the following mappings:
|
||||||
-- <tab>/<s-tab>: move to right/left of your snippet expansion
|
-- <tab>/<s-tab>: move to right/left of your snippet expansion
|
||||||
-- <c-space>: Open menu or open docs if already open
|
-- <c-space>: Open menu or open docs if already open
|
||||||
|
|
@ -58,39 +56,32 @@ return {
|
||||||
--
|
--
|
||||||
-- See :h blink-cmp-config-keymap for defining your own keymap
|
-- See :h blink-cmp-config-keymap for defining your own keymap
|
||||||
preset = 'default',
|
preset = 'default',
|
||||||
|
|
||||||
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
|
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
|
||||||
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
||||||
['<CR>'] = { 'accept', 'fallback' },
|
['<CR>'] = { 'accept', 'fallback' },
|
||||||
},
|
},
|
||||||
|
|
||||||
appearance = {
|
appearance = {
|
||||||
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
||||||
-- Adjusts spacing to ensure icons are aligned
|
-- Adjusts spacing to ensure icons are aligned
|
||||||
nerd_font_variant = 'mono',
|
nerd_font_variant = 'mono',
|
||||||
},
|
},
|
||||||
|
|
||||||
completion = {
|
completion = {
|
||||||
-- By default, you may press `<c-space>` to show the documentation.
|
-- By default, you may press `<c-space>` to show the documentation.
|
||||||
-- Optionally, set `auto_show = true` to show the documentation after a delay.
|
-- Optionally, set `auto_show = true` to show the documentation after a delay.
|
||||||
documentation = { auto_show = false, auto_show_delay_ms = 500 },
|
documentation = { auto_show = false, auto_show_delay_ms = 500 },
|
||||||
},
|
},
|
||||||
|
|
||||||
sources = {
|
sources = {
|
||||||
default = { 'lsp', 'path', 'snippets', 'lazydev' },
|
default = { 'lsp', 'path', 'snippets', 'lazydev' },
|
||||||
providers = {
|
providers = {
|
||||||
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
|
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
snippets = { preset = 'luasnip' },
|
snippets = { preset = 'luasnip' },
|
||||||
|
|
||||||
-- Blink.cmp includes an optional, recommended rust fuzzy matcher,
|
-- Blink.cmp includes an optional, recommended rust fuzzy matcher,
|
||||||
-- which automatically downloads a prebuilt binary when enabled.
|
-- which automatically downloads a prebuilt binary when enabled.
|
||||||
--
|
|
||||||
-- By default, we use the Lua implementation instead, but you may enable
|
-- By default, we use the Lua implementation instead, but you may enable
|
||||||
-- the rust implementation via `'prefer_rust_with_warning'`
|
-- the rust implementation via `'prefer_rust_with_warning'`
|
||||||
--
|
|
||||||
-- See :h blink-cmp-config-fuzzy for more information
|
-- See :h blink-cmp-config-fuzzy for more information
|
||||||
fuzzy = { implementation = 'lua' },
|
fuzzy = { implementation = 'lua' },
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,21 +30,15 @@ return {
|
||||||
{ 'j-hui/fidget.nvim', opts = {} },
|
{ 'j-hui/fidget.nvim', opts = {} },
|
||||||
|
|
||||||
-- Allows extra capabilities provided by blink.cmp
|
-- Allows extra capabilities provided by blink.cmp
|
||||||
|
-- Already installed in another file
|
||||||
'saghen/blink.cmp',
|
'saghen/blink.cmp',
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
-- Brief aside: **What is LSP?**
|
-- Brief aside: **What is LSP?**
|
||||||
--
|
--
|
||||||
-- LSP is an initialism you've probably heard, but might not understand what it is.
|
|
||||||
--
|
|
||||||
-- LSP stands for Language Server Protocol. It's a protocol that helps editors
|
-- LSP stands for Language Server Protocol. It's a protocol that helps editors
|
||||||
-- and language tooling communicate in a standardized fashion.
|
-- and language tooling communicate in a standardized fashion.
|
||||||
--
|
--
|
||||||
-- In general, you have a "server" which is some tool built to understand a particular
|
|
||||||
-- language (such as `gopls`, `lua_ls`, `rust_analyzer`, etc.). These Language Servers
|
|
||||||
-- (sometimes called LSP servers, but that's kind of like ATM Machine) are standalone
|
|
||||||
-- processes that communicate with some "client" - in this case, Neovim!
|
|
||||||
--
|
|
||||||
-- LSP provides Neovim with features like:
|
-- LSP provides Neovim with features like:
|
||||||
-- - Go to definition
|
-- - Go to definition
|
||||||
-- - Find references
|
-- - Find references
|
||||||
|
|
@ -65,11 +59,6 @@ return {
|
||||||
vim.api.nvim_create_autocmd('LspAttach', {
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
|
group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
|
||||||
callback = function(event)
|
callback = function(event)
|
||||||
-- NOTE: Remember that Lua is a real programming language, and as such it is possible
|
|
||||||
-- to define small helper and utility functions so you don't have to repeat yourself.
|
|
||||||
--
|
|
||||||
-- 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, mode)
|
local map = function(keys, func, desc, mode)
|
||||||
mode = mode or 'n'
|
mode = mode or 'n'
|
||||||
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
|
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
|
||||||
|
|
@ -84,18 +73,15 @@ return {
|
||||||
map('gra', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' })
|
map('gra', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' })
|
||||||
|
|
||||||
-- Find references for the word under your cursor.
|
-- Find references for the word under your cursor.
|
||||||
-- map('grr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
|
|
||||||
map('grr', require('fzf-lua').lsp_references, '[G]oto [R]eferences')
|
map('grr', require('fzf-lua').lsp_references, '[G]oto [R]eferences')
|
||||||
|
|
||||||
-- Jump to the implementation of the word under your cursor.
|
-- Jump to the implementation of the word under your cursor.
|
||||||
-- Useful when your language has ways of declaring types without an actual implementation.
|
-- Useful when your language has ways of declaring types without an actual implementation.
|
||||||
-- map('gri', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
|
|
||||||
map('gri', require('fzf-lua').lsp_implementations, '[G]oto [I]mplementation')
|
map('gri', require('fzf-lua').lsp_implementations, '[G]oto [I]mplementation')
|
||||||
|
|
||||||
-- Jump to the definition of the word under your cursor.
|
-- Jump to the definition of the word under your cursor.
|
||||||
-- This is where a variable was first declared, or where a function is defined, etc.
|
-- This is where a variable was first declared, or where a function is defined, etc.
|
||||||
-- 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('fzf-lua').lsp_definitions, '[G]oto [D]efinition')
|
map('grd', require('fzf-lua').lsp_definitions, '[G]oto [D]efinition')
|
||||||
|
|
||||||
-- WARN: This is not Goto Definition, this is Goto Declaration.
|
-- WARN: This is not Goto Definition, this is Goto Declaration.
|
||||||
|
|
@ -104,18 +90,15 @@ return {
|
||||||
|
|
||||||
-- Fuzzy find all the symbols in your current document.
|
-- Fuzzy find all the symbols in your current document.
|
||||||
-- Symbols are things like variables, functions, types, etc.
|
-- Symbols are things like variables, functions, types, etc.
|
||||||
-- map('gO', require('telescope.builtin').lsp_document_symbols, 'Open Document Symbols')
|
|
||||||
map('gO', require('fzf-lua').lsp_document_symbols, 'Open Document Symbols')
|
map('gO', require('fzf-lua').lsp_document_symbols, 'Open Document Symbols')
|
||||||
|
|
||||||
-- Fuzzy find all the symbols in your current workspace.
|
-- Fuzzy find all the symbols in your current workspace.
|
||||||
-- Similar to document symbols, except searches over your entire project.
|
-- Similar to document symbols, except searches over your entire project.
|
||||||
-- map('gW', require('telescope.builtin').lsp_dynamic_workspace_symbols, 'Open Workspace Symbols')
|
|
||||||
map('gW', require('fzf-lua').lsp_workspace_symbols, 'Open Workspace Symbols')
|
map('gW', require('fzf-lua').lsp_workspace_symbols, 'Open Workspace Symbols')
|
||||||
|
|
||||||
-- Jump to the type of the word under your cursor.
|
-- Jump to the type of the word under your cursor.
|
||||||
-- Useful when you're not sure what type a variable is and you want to see
|
-- Useful when you're not sure what type a variable is and you want to see
|
||||||
-- the definition of its *type*, not where it was *defined*.
|
-- the definition of its *type*, not where it was *defined*.
|
||||||
-- map('grt', require('telescope.builtin').lsp_type_definitions, '[G]oto [T]ype Definition')
|
|
||||||
map('grt', require('fzf-lua').lsp_typedefs, '[G]oto [T]ype Definition')
|
map('grt', require('fzf-lua').lsp_typedefs, '[G]oto [T]ype Definition')
|
||||||
|
|
||||||
-- The following two autocommands are used to highlight references of the
|
-- The following two autocommands are used to highlight references of the
|
||||||
|
|
@ -129,7 +112,6 @@ return {
|
||||||
group = highlight_augroup,
|
group = highlight_augroup,
|
||||||
callback = vim.lsp.buf.document_highlight,
|
callback = vim.lsp.buf.document_highlight,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- When you move your cursor, the highlights will be cleared
|
-- When you move your cursor, the highlights will be cleared
|
||||||
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
|
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
|
||||||
buffer = event.buf,
|
buffer = event.buf,
|
||||||
|
|
@ -148,7 +130,6 @@ return {
|
||||||
|
|
||||||
-- The following code creates a keymap to toggle inlay hints in your
|
-- The following code creates a keymap to toggle inlay hints in your
|
||||||
-- code, if the language server you are using supports them
|
-- code, if the language server you are using supports them
|
||||||
--
|
|
||||||
-- This may be unwanted, since they displace some of your code
|
-- This may be unwanted, since they displace some of your code
|
||||||
if client and client:supports_method('textDocument/inlayHint', event.buf) then
|
if client and client:supports_method('textDocument/inlayHint', event.buf) then
|
||||||
map('<leader>th', function()
|
map('<leader>th', function()
|
||||||
|
|
@ -191,7 +172,8 @@ return {
|
||||||
-- By default, Neovim doesn't support everything that is in the LSP specification.
|
-- 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.
|
-- 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.
|
-- So, we create new capabilities with blink.cmp, and then broadcast that to the servers.
|
||||||
-- local capabilities = require('blink.cmp').get_lsp_capabilities()
|
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
||||||
|
vim.lsp.config('*', { capabilities = capabilities })
|
||||||
|
|
||||||
-- Add any additional override configuration in the following tables. Available keys are:
|
-- Add any additional override configuration in the following tables. Available keys are:
|
||||||
-- - cmd (table): Override the default command used to start the server
|
-- - cmd (table): Override the default command used to start the server
|
||||||
|
|
@ -199,43 +181,24 @@ return {
|
||||||
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
|
-- - 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.
|
-- - 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/
|
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||||
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||||
local servers = {
|
local servers = {
|
||||||
clangd = {},
|
clangd = {},
|
||||||
gopls = {},
|
gopls = {},
|
||||||
pyright = {},
|
pyright = {},
|
||||||
rust_analyzer = {},
|
rust_analyzer = {},
|
||||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
|
||||||
stylua = {},
|
stylua = {},
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
-- cmd = { ... },
|
-- cmd = { ... },
|
||||||
-- filetypes = { ... },
|
-- filetypes = { ... },
|
||||||
-- capabilities = {},
|
-- capabilities = {},
|
||||||
on_init = function(client)
|
-- on_init = function(client)
|
||||||
if client.workspace_folders then
|
-- end,
|
||||||
local path = client.workspace_folders[1].name
|
|
||||||
if path ~= vim.fn.stdpath 'config' and (vim.uv.fs_stat(path .. '/.luarc.json') or vim.uv.fs_stat(path .. '/.luarc.jsonc')) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
|
||||||
-- runtime = {
|
|
||||||
-- version = 'LuaJIT',
|
|
||||||
-- path = { 'lua/?.lua', 'lua/?/init.lua' },
|
|
||||||
-- },
|
|
||||||
-- workspace = {
|
|
||||||
-- checkThirdParty = false,
|
|
||||||
-- -- NOTE: this is a lot slower and will cause issues when working on your own configuration.
|
|
||||||
-- -- See https://github.com/neovim/nvim-lspconfig/issues/3189
|
|
||||||
-- library = vim.tbl_extend('force', vim.api.nvim_get_runtime_file('', true), {
|
|
||||||
-- '${3rd}/luv/library',
|
|
||||||
-- '${3rd}/busted/library',
|
|
||||||
-- }),
|
|
||||||
-- },
|
|
||||||
-- })
|
|
||||||
end,
|
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
|
runtime = {
|
||||||
|
version = 'LuaJIT',
|
||||||
|
},
|
||||||
completion = {
|
completion = {
|
||||||
callSnippet = 'Replace',
|
callSnippet = 'Replace',
|
||||||
},
|
},
|
||||||
|
|
@ -248,17 +211,13 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ts_ls = {},
|
ts_ls = {},
|
||||||
-- TODO: make biome work as lsp fot ts, js, tsx, jsx files instead of ts_ls
|
-- TODO: make biome work as lsp for ts, js, tsx, jsx files instead of ts_ls
|
||||||
biome = {
|
biome = {
|
||||||
-- cmd = { 'biome', 'lsp-proxy' },
|
-- cmd = { 'biome', 'lsp-proxy' },
|
||||||
-- root_dir = require('lspconfig').util.root_pattern('package.json', '.git'),
|
-- root_dir = require('lspconfig').util.root_pattern('package.json', '.git'),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Ensure the servers and tools above are installed
|
|
||||||
-- To check the current status of installed tools and/or manually install
|
|
||||||
-- other tools, you can run
|
|
||||||
-- :Mason
|
|
||||||
local ensure_installed = vim.tbl_keys(servers or {})
|
local ensure_installed = vim.tbl_keys(servers or {})
|
||||||
vim.list_extend(ensure_installed, {
|
vim.list_extend(ensure_installed, {
|
||||||
-- add any other tools we want from mason
|
-- add any other tools we want from mason
|
||||||
|
|
|
||||||
|
|
@ -5,15 +5,6 @@ return {
|
||||||
branch = 'main',
|
branch = 'main',
|
||||||
build = ':TSUpdate',
|
build = ':TSUpdate',
|
||||||
opts = {},
|
opts = {},
|
||||||
-- dependencies = {
|
|
||||||
-- 'windwp/nvim-ts-autotag', -- auto close tsx tags
|
|
||||||
-- },
|
|
||||||
-- opts = {
|
|
||||||
-- autotag = {
|
|
||||||
-- -- Setup autotag using treesitter config.
|
|
||||||
-- enable = true,
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
-- main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
||||||
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
|
|
@ -35,9 +26,10 @@ return {
|
||||||
'elixir',
|
'elixir',
|
||||||
'toml',
|
'toml',
|
||||||
'yaml',
|
'yaml',
|
||||||
'ecma',
|
|
||||||
'typescript',
|
'typescript',
|
||||||
|
'javascript',
|
||||||
'tsx',
|
'tsx',
|
||||||
|
'jsx',
|
||||||
}
|
}
|
||||||
local alreadyInstalled = require('nvim-treesitter').get_installed 'parsers'
|
local alreadyInstalled = require('nvim-treesitter').get_installed 'parsers'
|
||||||
local parsersToInstall = vim
|
local parsersToInstall = vim
|
||||||
|
|
@ -46,7 +38,7 @@ return {
|
||||||
return not vim.tbl_contains(alreadyInstalled, parser)
|
return not vim.tbl_contains(alreadyInstalled, parser)
|
||||||
end)
|
end)
|
||||||
:totable()
|
:totable()
|
||||||
-- print(parsersToInstall)
|
|
||||||
if #parsersToInstall > 0 then
|
if #parsersToInstall > 0 then
|
||||||
require('nvim-treesitter').install(parsersToInstall)
|
require('nvim-treesitter').install(parsersToInstall)
|
||||||
end
|
end
|
||||||
|
|
@ -58,7 +50,6 @@ return {
|
||||||
group = vim.api.nvim_create_augroup('EnableTreesitterHighlighting', { clear = true }),
|
group = vim.api.nvim_create_augroup('EnableTreesitterHighlighting', { clear = true }),
|
||||||
pattern = filetypes,
|
pattern = filetypes,
|
||||||
callback = function(event)
|
callback = function(event)
|
||||||
print(event.buf)
|
|
||||||
local parser_installed = pcall(vim.treesitter.get_parser, event.buf, parser)
|
local parser_installed = pcall(vim.treesitter.get_parser, event.buf, parser)
|
||||||
if parser_installed then
|
if parser_installed then
|
||||||
pcall(vim.treesitter.start, event.buf, parser)
|
pcall(vim.treesitter.start, event.buf, parser)
|
||||||
|
|
@ -73,11 +64,6 @@ return {
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
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
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||||
|
|
|
||||||
|
|
@ -3,23 +3,10 @@
|
||||||
-- To check the current status of your plugins, run
|
-- To check the current status of your plugins, run
|
||||||
-- :Lazy
|
-- :Lazy
|
||||||
--
|
--
|
||||||
-- You can press `?` in this menu for help. Use `:q` to close the window
|
|
||||||
--
|
|
||||||
-- To update plugins you can run
|
|
||||||
-- :Lazy update
|
|
||||||
--
|
|
||||||
-- NOTE: Here is where you install your plugins.
|
|
||||||
require('lazy').setup({
|
require('lazy').setup({
|
||||||
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
|
-- 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', -- 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
|
|
||||||
-- keys can be used to configure plugin behavior/loading/etc.
|
|
||||||
--
|
|
||||||
-- Use `opts = {}` to automatically pass options to a plugin's `setup()` function, forcing the plugin to be loaded.
|
|
||||||
--
|
|
||||||
|
|
||||||
-- modular approach: using `require 'path/name'` will
|
-- modular approach: using `require 'path/name'` will
|
||||||
-- include a plugin definition from file lua/path/name.lua
|
-- include a plugin definition from file lua/path/name.lua
|
||||||
require 'kickstart/plugins/git',
|
require 'kickstart/plugins/git',
|
||||||
|
|
@ -33,16 +20,6 @@ require('lazy').setup({
|
||||||
require 'kickstart/plugins/mini',
|
require 'kickstart/plugins/mini',
|
||||||
require 'kickstart/plugins/treesitter',
|
require 'kickstart/plugins/treesitter',
|
||||||
require 'kickstart/plugins/undotree',
|
require 'kickstart/plugins/undotree',
|
||||||
|
|
||||||
-- 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.
|
|
||||||
|
|
||||||
-- NOTE: Next step on your Neovim journey: Add/Configure additional plugins for Kickstart
|
|
||||||
--
|
|
||||||
-- Here are some example plugins that I've included in the Kickstart repository.
|
|
||||||
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
|
||||||
--
|
|
||||||
-- 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',
|
||||||
|
|
@ -51,7 +28,6 @@ require('lazy').setup({
|
||||||
|
|
||||||
-- 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.
|
||||||
--
|
|
||||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||||
-- { import = 'custom.plugins' },
|
-- { import = 'custom.plugins' },
|
||||||
require 'custom/plugins/snacks',
|
require 'custom/plugins/snacks',
|
||||||
|
|
@ -63,14 +39,8 @@ require('lazy').setup({
|
||||||
require 'custom/plugins/noice',
|
require 'custom/plugins/noice',
|
||||||
require 'custom/plugins/theme',
|
require 'custom/plugins/theme',
|
||||||
require 'custom/plugins/indent-blankline',
|
require 'custom/plugins/indent-blankline',
|
||||||
require 'custom/plugins/leetcode',
|
-- require 'custom/plugins/leetcode',
|
||||||
require 'custom/plugins/ts-tag-autoclose',
|
require 'custom/plugins/ts-tag-autoclose',
|
||||||
|
|
||||||
--
|
|
||||||
-- 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 = {
|
ui = {
|
||||||
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
-- Make line numbers default
|
-- Make line numbers default
|
||||||
vim.o.number = true
|
vim.o.number = true
|
||||||
-- You can also add relative line numbers, to help with jumping.
|
-- You can also add relative line numbers, to help with jumping.
|
||||||
-- Experiment for yourself to see if you like it!
|
|
||||||
vim.o.relativenumber = true
|
vim.o.relativenumber = true
|
||||||
|
|
||||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue