Skip to content

Commit cc4ef1a

Browse files
committed
made some changes
1 parent 63e5f7b commit cc4ef1a

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

lua/settings.lua

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
vim.g.have_nerd_font = true
1+
-- Correct clipboard configuration (this was the main issue)
2+
vim.opt.clipboard:append 'unnamedplus' -- Use system clipboard for all operations
23

4+
-- Remove this line (it's not doing anything useful)
5+
-- vim.g.have_nerd_font = true -- This is a custom variable not used in your config
6+
7+
-- Rest of your configuration with some optimizations:
38
vim.opt.number = true
49
vim.opt.relativenumber = true
510
vim.opt.mouse = 'a'
611
vim.opt.showmode = false
712
vim.opt.title = true
8-
vim.opt.clipboard = 'unnamedplus'
913
vim.opt.breakindent = true
1014
vim.opt.undofile = true
1115
vim.opt.ignorecase = true
@@ -30,26 +34,26 @@ vim.opt.path:append { '**' }
3034
vim.opt.wildignore:append { '*/node_modules/*' }
3135
vim.opt.formatoptions:append { 'r' }
3236

33-
-- Enable folding in Neovim
37+
-- Improved folding configuration
3438
vim.opt.foldmethod = 'expr'
3539
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
36-
vim.opt.foldlevel = 99 -- Keep folds open by default
37-
vim.opt.foldcolumn = '1' -- Show fold column left of line numbers
38-
39-
vim.opt.foldtext = 'v:lua.custom_foldtext()' -- Custom fold text function
40+
vim.opt.foldlevel = 99
41+
vim.opt.foldcolumn = '1'
4042

41-
-- Function to change fold symbols
43+
-- Custom fold text function (simplified)
4244
function _G.custom_foldtext()
43-
local line = vim.fn.getline(vim.v.foldstart) -- Get the first line of the fold
45+
local line = vim.trim(vim.fn.getline(vim.v.foldstart))
4446
local fold_size = vim.v.foldend - vim.v.foldstart + 1
45-
return line .. ' (' .. fold_size .. ' lines) ' -- Display fold size
47+
return string.format('⏷ %s ⏤ %d lines', line, fold_size)
4648
end
4749

48-
-- Customize fold markers in fold column
49-
vim.opt.statuscolumn = '%C' -- Customize fold column symbols
50+
vim.opt.foldtext = 'v:lua.custom_foldtext()'
51+
52+
-- Better fold characters configuration
5053
vim.opt.fillchars:append {
51-
foldopen = '', -- Down arrow for open folds
52-
foldclose = '', -- Right arrow for closed folds
53-
foldsep = ' ', -- Space between folds
54-
fold = ' ', -- Empty space for better visuals
54+
foldopen = '',
55+
foldclose = '',
56+
fold = ' ',
57+
foldsep = ' ',
58+
diff = '',
5559
}

0 commit comments

Comments
 (0)