kickstart.nvim/lua/settings.lua

60 lines
1.7 KiB
Lua
Raw Normal View History

2025-02-09 19:06:25 +03:00
-- Correct clipboard configuration (this was the main issue)
vim.opt.clipboard:append 'unnamedplus' -- Use system clipboard for all operations
2025-02-06 01:54:19 +03:00
2025-02-09 19:06:25 +03:00
-- 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:
2025-02-06 01:54:19 +03:00
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.mouse = 'a'
vim.opt.showmode = false
vim.opt.title = true
vim.opt.breakindent = true
vim.opt.undofile = true
vim.opt.ignorecase = true
vim.opt.smartcase = true
vim.opt.expandtab = true
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.autoindent = true
vim.opt.smartindent = true
vim.opt.signcolumn = 'yes'
2025-02-08 10:16:31 +03:00
vim.opt.updatetime = 200
2025-02-06 01:54:19 +03:00
vim.opt.timeoutlen = 300
vim.opt.splitright = true
vim.opt.splitbelow = true
vim.opt.list = true
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
vim.opt.inccommand = 'split'
vim.opt.cursorline = true
vim.opt.scrolloff = 10
2025-02-08 10:16:31 +03:00
vim.opt.backspace = { 'indent', 'eol', 'start' }
vim.opt.path:append { '**' }
vim.opt.wildignore:append { '*/node_modules/*' }
vim.opt.formatoptions:append { 'r' }
2025-02-09 19:06:25 +03:00
-- Improved folding configuration
2025-02-08 10:16:31 +03:00
vim.opt.foldmethod = 'expr'
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
2025-02-09 19:06:25 +03:00
vim.opt.foldlevel = 99
vim.opt.foldcolumn = '1'
2025-02-08 10:16:31 +03:00
2025-02-09 19:06:25 +03:00
-- Custom fold text function (simplified)
2025-02-08 10:16:31 +03:00
function _G.custom_foldtext()
2025-02-09 19:06:25 +03:00
local line = vim.trim(vim.fn.getline(vim.v.foldstart))
2025-02-08 10:16:31 +03:00
local fold_size = vim.v.foldend - vim.v.foldstart + 1
2025-02-09 19:06:25 +03:00
return string.format('⏷ %s ⏤ %d lines ⏵', line, fold_size)
2025-02-08 10:16:31 +03:00
end
2025-02-09 19:06:25 +03:00
vim.opt.foldtext = 'v:lua.custom_foldtext()'
-- Better fold characters configuration
2025-02-08 10:16:31 +03:00
vim.opt.fillchars:append {
2025-02-09 19:06:25 +03:00
foldopen = '',
foldclose = '',
fold = ' ',
foldsep = ' ',
diff = '',
2025-02-08 10:16:31 +03:00
}