Added nvim tree
This commit is contained in:
parent
9924f7e0a0
commit
73f450bc2d
18
init.lua
18
init.lua
|
@ -184,6 +184,9 @@ require('lazy').setup({
|
|||
--
|
||||
-- An additional note is that if you only copied in the `init.lua`, you can just comment this line
|
||||
-- to get rid of the warning telling you that there are not plugins in `lua/custom/plugins/`.
|
||||
{'towolf/vim-helm'},
|
||||
{'nvim-tree/nvim-tree.lua'},
|
||||
{'nvim-tree/nvim-web-devicons'},
|
||||
{ import = 'custom.plugins' },
|
||||
}, {})
|
||||
|
||||
|
@ -238,6 +241,8 @@ vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
|||
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||
|
||||
--- Autocommands
|
||||
|
||||
-- [[ Highlight on yank ]]
|
||||
-- See `:help vim.highlight.on_yank()`
|
||||
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
||||
|
@ -282,11 +287,20 @@ vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string, { de
|
|||
vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' })
|
||||
vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })
|
||||
|
||||
-- [[ Configure NvimTree ]]
|
||||
require("nvim-tree").setup()
|
||||
vim.keymap.set('n', '<leader>e', ":NvimTreeToggle<cr>", { desc = 'Toggle NvimTree' })
|
||||
vim.keymap.set('n', '<leader>ef', ':NvimTreeFindFile<cr>', { desc = 'Find file' })
|
||||
vim.keymap.set('n', '<C-h>', '<C-n><left>')
|
||||
vim.keymap.set('n', '<C-j>', '<C-n><up>')
|
||||
vim.keymap.set('n', '<C-k>', '<C-n><down>')
|
||||
vim.keymap.set('n', '<C-l>', '<C-n><right>')
|
||||
|
||||
-- [[ Configure Treesitter ]]
|
||||
-- See `:help nvim-treesitter`
|
||||
require('nvim-treesitter.configs').setup {
|
||||
-- Add languages to be installed here that you want installed for treesitter
|
||||
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim' },
|
||||
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim', 'terraform' },
|
||||
|
||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
||||
auto_install = false,
|
||||
|
@ -331,7 +345,7 @@ require('nvim-treesitter.configs').setup {
|
|||
['[m'] = '@function.outer',
|
||||
['[['] = '@class.outer',
|
||||
},
|
||||
goto_previous_end = {
|
||||
goto_previousqend = {
|
||||
['[M'] = '@function.outer',
|
||||
['[]'] = '@class.outer',
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue