made some changes
This commit is contained in:
parent
63e5f7b074
commit
cc4ef1a5de
|
@ -1,11 +1,15 @@
|
||||||
vim.g.have_nerd_font = true
|
-- Correct clipboard configuration (this was the main issue)
|
||||||
|
vim.opt.clipboard:append 'unnamedplus' -- Use system clipboard for all operations
|
||||||
|
|
||||||
|
-- Remove this line (it's not doing anything useful)
|
||||||
|
-- vim.g.have_nerd_font = true -- This is a custom variable not used in your config
|
||||||
|
|
||||||
|
-- Rest of your configuration with some optimizations:
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
vim.opt.mouse = 'a'
|
vim.opt.mouse = 'a'
|
||||||
vim.opt.showmode = false
|
vim.opt.showmode = false
|
||||||
vim.opt.title = true
|
vim.opt.title = true
|
||||||
vim.opt.clipboard = 'unnamedplus'
|
|
||||||
vim.opt.breakindent = true
|
vim.opt.breakindent = true
|
||||||
vim.opt.undofile = true
|
vim.opt.undofile = true
|
||||||
vim.opt.ignorecase = true
|
vim.opt.ignorecase = true
|
||||||
|
@ -30,26 +34,26 @@ vim.opt.path:append { '**' }
|
||||||
vim.opt.wildignore:append { '*/node_modules/*' }
|
vim.opt.wildignore:append { '*/node_modules/*' }
|
||||||
vim.opt.formatoptions:append { 'r' }
|
vim.opt.formatoptions:append { 'r' }
|
||||||
|
|
||||||
-- Enable folding in Neovim
|
-- Improved folding configuration
|
||||||
vim.opt.foldmethod = 'expr'
|
vim.opt.foldmethod = 'expr'
|
||||||
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
|
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||||
vim.opt.foldlevel = 99 -- Keep folds open by default
|
vim.opt.foldlevel = 99
|
||||||
vim.opt.foldcolumn = '1' -- Show fold column left of line numbers
|
vim.opt.foldcolumn = '1'
|
||||||
|
|
||||||
vim.opt.foldtext = 'v:lua.custom_foldtext()' -- Custom fold text function
|
-- Custom fold text function (simplified)
|
||||||
|
|
||||||
-- Function to change fold symbols
|
|
||||||
function _G.custom_foldtext()
|
function _G.custom_foldtext()
|
||||||
local line = vim.fn.getline(vim.v.foldstart) -- Get the first line of the fold
|
local line = vim.trim(vim.fn.getline(vim.v.foldstart))
|
||||||
local fold_size = vim.v.foldend - vim.v.foldstart + 1
|
local fold_size = vim.v.foldend - vim.v.foldstart + 1
|
||||||
return line .. ' (' .. fold_size .. ' lines) ' -- Display fold size
|
return string.format('⏷ %s ⏤ %d lines ⏵', line, fold_size)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Customize fold markers in fold column
|
vim.opt.foldtext = 'v:lua.custom_foldtext()'
|
||||||
vim.opt.statuscolumn = '%C' -- Customize fold column symbols
|
|
||||||
|
-- Better fold characters configuration
|
||||||
vim.opt.fillchars:append {
|
vim.opt.fillchars:append {
|
||||||
foldopen = '▾', -- Down arrow for open folds
|
foldopen = '',
|
||||||
foldclose = '▸', -- Right arrow for closed folds
|
foldclose = '',
|
||||||
foldsep = ' ', -- Space between folds
|
fold = ' ',
|
||||||
fold = ' ', -- Empty space for better visuals
|
foldsep = ' ',
|
||||||
|
diff = '╱',
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue