Improve neovim config
This commit is contained in:
parent
f5c7448c8a
commit
c5706f1cd8
@ -14,9 +14,13 @@
|
||||
lsp-zero-nvim
|
||||
vim-floaterm
|
||||
luasnip
|
||||
lualine-nvim
|
||||
vim-sleuth
|
||||
(nvim-treesitter.withPlugins (p: [
|
||||
p.tree-sitter-yaml
|
||||
p.tree-sitter-nix
|
||||
p.tree-sitter-go
|
||||
p.tree-sitter-lua
|
||||
p.tree-sitter-vim
|
||||
p.tree-sitter-bash
|
||||
p.tree-sitter-json
|
||||
|
@ -16,3 +16,7 @@ vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles,
|
||||
{ desc = '[?] FInd recently opened files' })
|
||||
vim.keymap.set('n', '<leader>ff', require('telescope.builtin').find_files,
|
||||
{ desc = '[F]ind [F]iles' })
|
||||
vim.keymap.set('n', '<leader>ff', require('telescope.builtin').find_files,
|
||||
{ desc = '[F]ind [F]iles' })
|
||||
vim.keymap.set('n', '<leader>fg', require('telescope.builtin').live_grep,
|
||||
{ desc = '[F]ind by [G]rep' })
|
||||
|
@ -10,3 +10,4 @@ vim.o.relativenumber = true
|
||||
|
||||
vim.o.tabstop = 4
|
||||
vim.o.shiftwidth = 4
|
||||
vim.o.expandtab = true
|
||||
|
@ -49,3 +49,69 @@ require('telescope').setup({
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
-- Tresitter stuff
|
||||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = {},
|
||||
auto_install = false,
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true},
|
||||
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = '<c-space>',
|
||||
node_incremental = '<c-space>',
|
||||
scope_incremental = '<c-s>',
|
||||
node_decremental = '<M-space>',
|
||||
},
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
|
||||
keymaps = {
|
||||
['aa'] = '@parameter.outer',
|
||||
['ia'] = '@parameter.inner',
|
||||
['af'] = '@function.outer',
|
||||
['if'] = '@function.inner',
|
||||
['ac'] = '@class.outer',
|
||||
['ic'] = '@class.inner',
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-- Lualine
|
||||
require('lualine').setup({
|
||||
options = {
|
||||
icons_enabled = false,
|
||||
component_separators = '|',
|
||||
disabled_filetypes = {},
|
||||
always_divide_middle = true,
|
||||
globalstatus = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||
lualine_c = {
|
||||
{
|
||||
'filename',
|
||||
file_status = true,
|
||||
newfile_status = true,
|
||||
path = 3,
|
||||
shorting_target = 30,
|
||||
symbols = {
|
||||
modified = '[+]',
|
||||
readonly = '[-]',
|
||||
unnamed = '[No name]',
|
||||
newfile = '[New]'
|
||||
}
|
||||
}
|
||||
},
|
||||
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
||||
lualine_y = { 'progress' },
|
||||
lualine_z = { 'location' }
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user