Compare commits
13 commits
4795540b7d
...
d34281a630
Author | SHA1 | Date | |
---|---|---|---|
|
d34281a630 | ||
|
2ace500d85 | ||
|
9009dfc7c9 | ||
|
368b0afe00 | ||
|
d5006f9407 | ||
|
68ad1b63f9 | ||
|
c9c8fa82af | ||
|
6570754479 | ||
|
0d662bdbee | ||
|
1bca80e56a | ||
|
03a2ca3273 | ||
|
fd18ddfd0a | ||
|
51889f5ac7 |
2 changed files with 52 additions and 27 deletions
|
@ -140,8 +140,7 @@ This will install the tree plugin and add the command `:Neotree` for you. For mo
|
||||||
In the file: `lua/custom/plugins/filetree.lua`, add:
|
In the file: `lua/custom/plugins/filetree.lua`, add:
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
-- Unless you are still migrating, remove the deprecated commands from v1.x
|
-- File: lua/custom/plugins/filetree.lua
|
||||||
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
|
76
init.lua
76
init.lua
|
@ -130,6 +130,9 @@ vim.opt.signcolumn = 'yes'
|
||||||
|
|
||||||
-- Decrease update time
|
-- Decrease update time
|
||||||
vim.opt.updatetime = 250
|
vim.opt.updatetime = 250
|
||||||
|
|
||||||
|
-- Decrease mapped sequence wait time
|
||||||
|
-- Displays which-key popup sooner
|
||||||
vim.opt.timeoutlen = 300
|
vim.opt.timeoutlen = 300
|
||||||
|
|
||||||
-- Configure how new splits should be opened
|
-- Configure how new splits should be opened
|
||||||
|
@ -436,6 +439,10 @@ require('lazy').setup({
|
||||||
-- Useful status updates for LSP.
|
-- Useful status updates for LSP.
|
||||||
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
||||||
{ 'j-hui/fidget.nvim', opts = {} },
|
{ '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 = {} },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
-- Brief Aside: **What is LSP?**
|
-- Brief Aside: **What is LSP?**
|
||||||
|
@ -482,7 +489,7 @@ require('lazy').setup({
|
||||||
|
|
||||||
-- 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('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
|
map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
|
||||||
|
|
||||||
-- Find references for the word under your cursor.
|
-- Find references for the word under your cursor.
|
||||||
|
@ -575,18 +582,6 @@ require('lazy').setup({
|
||||||
-- capabilities = {},
|
-- capabilities = {},
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
runtime = { version = 'LuaJIT' },
|
|
||||||
workspace = {
|
|
||||||
checkThirdParty = false,
|
|
||||||
-- Tells lua_ls where to find all the Lua files that you have loaded
|
|
||||||
-- for your neovim configuration.
|
|
||||||
library = {
|
|
||||||
'${3rd}/luv/library',
|
|
||||||
unpack(vim.api.nvim_get_runtime_file('', true)),
|
|
||||||
},
|
|
||||||
-- If lua_ls is really slow on your computer, you can try this instead:
|
|
||||||
-- library = { vim.env.VIMRUNTIME },
|
|
||||||
},
|
|
||||||
completion = {
|
completion = {
|
||||||
callSnippet = 'Replace',
|
callSnippet = 'Replace',
|
||||||
},
|
},
|
||||||
|
@ -637,10 +632,16 @@ require('lazy').setup({
|
||||||
'stevearc/conform.nvim',
|
'stevearc/conform.nvim',
|
||||||
opts = {
|
opts = {
|
||||||
notify_on_error = false,
|
notify_on_error = false,
|
||||||
format_on_save = {
|
format_on_save = function(bufnr)
|
||||||
timeout_ms = 500,
|
-- Disable "format_on_save lsp_fallback" for languages that don't
|
||||||
lsp_fallback = true,
|
-- 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 }
|
||||||
|
return {
|
||||||
|
timeout_ms = 500,
|
||||||
|
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype],
|
||||||
|
}
|
||||||
|
end,
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { 'stylua' },
|
lua = { 'stylua' },
|
||||||
-- Conform can also run multiple formatters sequentially
|
-- Conform can also run multiple formatters sequentially
|
||||||
|
@ -676,6 +677,17 @@ require('lazy').setup({
|
||||||
end
|
end
|
||||||
return 'make install_jsregexp'
|
return 'make install_jsregexp'
|
||||||
end)(),
|
end)(),
|
||||||
|
dependencies = {
|
||||||
|
-- `friendly-snippets` contains a variety of premade snippets.
|
||||||
|
-- See the README about individual language/framework/plugin snippets:
|
||||||
|
-- https://github.com/rafamadriz/friendly-snippets
|
||||||
|
-- {
|
||||||
|
-- 'rafamadriz/friendly-snippets',
|
||||||
|
-- config = function()
|
||||||
|
-- require('luasnip.loaders.from_vscode').lazy_load()
|
||||||
|
-- end,
|
||||||
|
-- },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
'saadparwaiz1/cmp_luasnip',
|
'saadparwaiz1/cmp_luasnip',
|
||||||
|
|
||||||
|
@ -718,6 +730,10 @@ require('lazy').setup({
|
||||||
-- Select the [p]revious item
|
-- Select the [p]revious item
|
||||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||||
|
|
||||||
|
-- scroll the documentation window [b]ack / [f]orward
|
||||||
|
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
|
||||||
-- Accept ([y]es) the completion.
|
-- Accept ([y]es) the completion.
|
||||||
-- This will auto-import if your LSP supports it.
|
-- This will auto-import if your LSP supports it.
|
||||||
-- This will expand snippets if the LSP sent a snippet.
|
-- This will expand snippets if the LSP sent a snippet.
|
||||||
|
@ -746,6 +762,9 @@ require('lazy').setup({
|
||||||
luasnip.jump(-1)
|
luasnip.jump(-1)
|
||||||
end
|
end
|
||||||
end, { 'i', 's' }),
|
end, { 'i', 's' }),
|
||||||
|
|
||||||
|
-- For more advanced luasnip keymaps (e.g. selecting choice nodes, expansion) see:
|
||||||
|
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
||||||
},
|
},
|
||||||
sources = {
|
sources = {
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
|
@ -822,17 +841,24 @@ require('lazy').setup({
|
||||||
{ -- Highlight, edit, and navigate code
|
{ -- Highlight, edit, and navigate code
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
build = ':TSUpdate',
|
build = ':TSUpdate',
|
||||||
config = function()
|
opts = {
|
||||||
|
ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc' },
|
||||||
|
-- Autoinstall languages that are not installed
|
||||||
|
auto_install = true,
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
|
||||||
|
-- If you are experiencing weird indenting issues, add the language to
|
||||||
|
-- the list of additional_vim_regex_highlighting and disabled languages for indent.
|
||||||
|
additional_vim_regex_highlighting = { 'ruby' },
|
||||||
|
},
|
||||||
|
indent = { enable = true, disable = { 'ruby' } },
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
||||||
|
|
||||||
---@diagnostic disable-next-line: missing-fields
|
---@diagnostic disable-next-line: missing-fields
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup(opts)
|
||||||
ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc' },
|
|
||||||
-- Autoinstall languages that are not installed
|
|
||||||
auto_install = true,
|
|
||||||
highlight = { enable = true },
|
|
||||||
indent = { enable = true },
|
|
||||||
}
|
|
||||||
|
|
||||||
-- There are additional nvim-treesitter modules that you can use to interact
|
-- 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:
|
-- with nvim-treesitter. You should go explore a few and see what interests you:
|
||||||
|
|
Loading…
Reference in a new issue