vim: stylistic tweaks

This commit is contained in:
Fernando Schauenburg 2023-07-08 22:15:37 +02:00
parent a00e28b031
commit 3e9376bf82
5 changed files with 40 additions and 31 deletions

View file

@ -1,6 +1,8 @@
return { return {
'norcalli/nvim-colorizer.lua', 'norcalli/nvim-colorizer.lua',
cond = vim.opt.termguicolors:get(), cond = vim.opt.termguicolors:get(),
config = function() config = function()
require('colorizer').setup({'*'}, { mode = 'foreground' }) require('colorizer').setup({'*'}, { mode = 'foreground' })
end, end,

View file

@ -1,5 +1,6 @@
return { return {
'tpope/vim-fugitive', 'tpope/vim-fugitive',
config = function() config = function()
vim.keymap.set('n', '<leader>gs', '<cmd>tab Git<cr>') vim.keymap.set('n', '<leader>gs', '<cmd>tab Git<cr>')
vim.keymap.set('n', '<leader>gb', '<cmd>Git blame<cr>') vim.keymap.set('n', '<leader>gb', '<cmd>Git blame<cr>')

View file

@ -1,10 +1,12 @@
return { return {
'lukas-reineke/indent-blankline.nvim', 'lukas-reineke/indent-blankline.nvim',
config = function() opts = {
require('indent_blankline').setup { enabled = false,
enabled = false, },
}
config = function(_, opts)
require('indent_blankline').setup(opts)
-- show/hide indent guides -- show/hide indent guides
vim.keymap.set('n', '<leader>si', '<cmd>IndentBlanklineToggle<cr>') vim.keymap.set('n', '<leader>si', '<cmd>IndentBlanklineToggle<cr>')

View file

@ -14,33 +14,35 @@ end
return { return {
'kyazdani42/nvim-tree.lua', 'kyazdani42/nvim-tree.lua',
config = function() opts = {
require('nvim-tree').setup { disable_netrw = true, -- replace netrw with nvim-tree
disable_netrw = true, -- replace netrw with nvim-tree hijack_cursor = true, -- keep the cursor on begin of the filename
hijack_cursor = true, -- keep the cursor on begin of the filename sync_root_with_cwd = true, -- watch for `DirChanged` and refresh the tree
sync_root_with_cwd = true, -- watch for `DirChanged` and refresh the tree on_attach = on_attach,
on_attach = on_attach,
git = { git = {
ignore = false, -- don't hide files from .gitignore ignore = false, -- don't hide files from .gitignore
}, },
view = { view = {
adaptive_size = true, -- resize the window based on the longest line adaptive_size = true, -- resize the window based on the longest line
width = 35, -- a little wider than the default 30 width = 35, -- a little wider than the default 30
}, },
filters = { filters = {
dotfiles = false, -- show files starting with a . dotfiles = false, -- show files starting with a .
custom = { '^\\.git' }, -- don't show .git directory custom = { '^\\.git' }, -- don't show .git directory
}, },
renderer = { renderer = {
add_trailing = true, -- add trailing / to folders add_trailing = true, -- add trailing / to folders
group_empty = true, -- folders that contain only one folder are grouped group_empty = true, -- folders that contain only one folder are grouped
highlight_git = true, -- enable highlight based on git attributes highlight_git = true, -- enable highlight based on git attributes
}, },
} },
config = function(_, opts)
require('nvim-tree').setup(opts)
vim.keymap.set('n', '<leader>nn', '<cmd>NvimTreeOpen<cr>') vim.keymap.set('n', '<leader>nn', '<cmd>NvimTreeOpen<cr>')
vim.keymap.set('n', '<leader>nf', '<cmd>NvimTreeFindFile<cr>') vim.keymap.set('n', '<leader>nf', '<cmd>NvimTreeFindFile<cr>')

View file

@ -1,10 +1,12 @@
return { return {
'lukas-reineke/virt-column.nvim', 'lukas-reineke/virt-column.nvim',
config = function() opts = {
require('virt-column').setup { char = '',
char = '', },
}
config = function(_, opts)
require('virt-column').setup(opts)
local toggle_virtual_column = function() local toggle_virtual_column = function()
if vim.o.colorcolumn == '' then if vim.o.colorcolumn == '' then