This commit is contained in:
jhe 2024-05-23 16:22:16 +02:00
parent 1ff791946a
commit a02e2257bc
No known key found for this signature in database
GPG Key ID: 10FFC60F6B8DC9B7
1 changed files with 33 additions and 20 deletions

View File

@ -201,26 +201,6 @@ vim.api.nvim_create_autocmd({ 'BufReadPost' }, {
end,
})
-- Function to set tab width
--[[
local set_tab_width = function(ft, width)
vim.api.nvim_create_autocmd('FileType', {
pattern = ft,
callback = function()
vim.bo.shiftwidth = width
vim.bo.tabstop = width
--vim.bo.expandtab = true
end,
})
end
]]
--
-- Set tabwidth for file types
--set_tab_width('python', 4)
--set_tab_width('c', 4)
--set_tab_width('c++', 2)
-- Highlight when yanking (copying) text
-- Try it with `yap` in normal mode
-- See `:help vim.highlight.on_yank()`
@ -331,6 +311,39 @@ require('lazy').setup({
--
-- Use the `dependencies` key to specify the dependencies of a particular plugin
{
'nvim-neo-tree/neo-tree.nvim',
cmd = 'Neotree',
branch = 'v3.x',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
'MunifTanjim/nui.nvim',
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
},
keys = {
{
'<leader>t',
function()
require('neo-tree.command').execute { toggle = true }
end,
desc = 'Explorer NeoTree (Root Dir)',
},
},
opts = {
event_handlers = {
{
event = 'neo_tree_buffer_enter',
handler = function(arg)
vim.cmd [[
setlocal relativenumber
]]
end,
},
},
},
},
{ -- Fuzzy Finder (files, lsp, etc)
'nvim-telescope/telescope.nvim',
event = 'VimEnter',