adding additional plugins
This commit is contained in:
parent
66c760bf9a
commit
50a0ab51b6
|
@ -3,8 +3,7 @@
|
||||||
-- Use your language server to automatically format your code on save.
|
-- Use your language server to automatically format your code on save.
|
||||||
-- Adds additional commands as well to manage the behavior
|
-- Adds additional commands as well to manage the behavior
|
||||||
|
|
||||||
return {
|
return { 'neovim/nvim-lspconfig',
|
||||||
'neovim/nvim-lspconfig',
|
|
||||||
config = function()
|
config = function()
|
||||||
-- Switch for controlling whether you want autoformatting.
|
-- Switch for controlling whether you want autoformatting.
|
||||||
-- Use :KickstartFormatToggle to toggle autoformatting on or off
|
-- Use :KickstartFormatToggle to toggle autoformatting on or off
|
||||||
|
|
|
@ -1,86 +1,84 @@
|
||||||
return {
|
return {
|
||||||
-- Highlight, edit, and navigate code
|
-- Highlight, edit, and navigate code
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||||
},
|
},
|
||||||
build = ':TSUpdate',
|
build = ':TSUpdate',
|
||||||
|
|
||||||
config = function()
|
config = function()
|
||||||
-- [[ Configure Treesitter ]]
|
-- [[ Configure Treesitter ]]
|
||||||
-- See `:help nvim-treesitter`
|
-- See `:help nvim-treesitter`
|
||||||
-- Defer Treesitter setup after first render to improve startup time of 'nvim {filename}'
|
-- Defer Treesitter setup after first render to improve startup time of 'nvim {filename}'
|
||||||
vim.defer_fn(function()
|
vim.defer_fn(function()
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
-- Add languages to be installed here that you want installed for treesitter
|
-- Add languages to be installed here that you want installed for treesitter
|
||||||
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash' },
|
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash' },
|
||||||
|
|
||||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
-- Install languages synchronously (only applied to `ensure_installed`)
|
-- Install languages synchronously (only applied to `ensure_installed`)
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
-- List of parsers to ignore installing
|
-- List of parsers to ignore installing
|
||||||
ignore_install = {},
|
ignore_install = {},
|
||||||
-- You can specify additional Treesitter modules here: -- For example: -- playground = {--enable = true,-- },
|
-- You can specify additional Treesitter modules here: -- For example: -- playground = {--enable = true,-- },
|
||||||
modules = {},
|
modules = {},
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
incremental_selection = {
|
incremental_selection = {
|
||||||
enable = true,
|
enable = true,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
init_selection = '<c-space>',
|
init_selection = '<c-space>',
|
||||||
node_incremental = '<c-space>',
|
node_incremental = '<c-space>',
|
||||||
scope_incremental = '<c-s>',
|
scope_incremental = '<c-s>',
|
||||||
node_decremental = '<M-space>',
|
node_decremental = '<M-space>',
|
||||||
},
|
},
|
||||||
},
|
|
||||||
textobjects = {
|
|
||||||
select = {
|
|
||||||
enable = true,
|
|
||||||
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
|
||||||
keymaps = {
|
|
||||||
-- You can use the capture groups defined in textobjects.scm
|
|
||||||
['aa'] = '@parameter.outer',
|
|
||||||
['ia'] = '@parameter.inner',
|
|
||||||
['af'] = '@function.outer',
|
|
||||||
['if'] = '@function.inner',
|
|
||||||
['ac'] = '@class.outer',
|
|
||||||
['ic'] = '@class.inner',
|
|
||||||
},
|
},
|
||||||
},
|
textobjects = {
|
||||||
move = {
|
select = {
|
||||||
enable = true,
|
enable = true,
|
||||||
set_jumps = true, -- whether to set jumps in the jumplist
|
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
||||||
goto_next_start = {
|
keymaps = {
|
||||||
[']m'] = '@function.outer',
|
-- You can use the capture groups defined in textobjects.scm
|
||||||
[']]'] = '@class.outer',
|
['aa'] = '@parameter.outer',
|
||||||
|
['ia'] = '@parameter.inner',
|
||||||
|
['af'] = '@function.outer',
|
||||||
|
['if'] = '@function.inner',
|
||||||
|
['ac'] = '@class.outer',
|
||||||
|
['ic'] = '@class.inner',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
move = {
|
||||||
|
enable = true,
|
||||||
|
set_jumps = true, -- whether to set jumps in the jumplist
|
||||||
|
goto_next_start = {
|
||||||
|
[']m'] = '@function.outer',
|
||||||
|
[']]'] = '@class.outer',
|
||||||
|
},
|
||||||
|
goto_next_end = {
|
||||||
|
[']M'] = '@function.outer',
|
||||||
|
[']['] = '@class.outer',
|
||||||
|
},
|
||||||
|
goto_previous_start = {
|
||||||
|
['[m'] = '@function.outer',
|
||||||
|
['[['] = '@class.outer',
|
||||||
|
},
|
||||||
|
goto_previous_end = {
|
||||||
|
['[M'] = '@function.outer',
|
||||||
|
['[]'] = '@class.outer',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
swap = {
|
||||||
|
enable = true,
|
||||||
|
swap_next = {
|
||||||
|
['<leader>a'] = '@parameter.inner',
|
||||||
|
},
|
||||||
|
swap_previous = {
|
||||||
|
['<leader>A'] = '@parameter.inner',
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
goto_next_end = {
|
}
|
||||||
[']M'] = '@function.outer',
|
end, 0)
|
||||||
[']['] = '@class.outer',
|
end
|
||||||
},
|
}
|
||||||
goto_previous_start = {
|
|
||||||
['[m'] = '@function.outer',
|
|
||||||
['[['] = '@class.outer',
|
|
||||||
},
|
|
||||||
goto_previous_end = {
|
|
||||||
['[M'] = '@function.outer',
|
|
||||||
['[]'] = '@class.outer',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
swap = {
|
|
||||||
enable = true,
|
|
||||||
swap_next = {
|
|
||||||
['<leader>a'] = '@parameter.inner',
|
|
||||||
},
|
|
||||||
swap_previous = {
|
|
||||||
['<leader>A'] = '@parameter.inner',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end, 0)
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue