mirror of
https://github.com/bgrolleman/dotfiles.git
synced 2026-06-26 07:20:43 +02:00
Cleanup nvim with Claude
This commit is contained in:
+4
-18
@@ -1,20 +1,5 @@
|
||||
print("advent of neovim")
|
||||
|
||||
require("config.lazy")
|
||||
--
|
||||
-- local o = vim.opt
|
||||
-- o.compatible = false
|
||||
-- o.number = true
|
||||
-- o.cmdheight = 2
|
||||
-- o.expandtab = true
|
||||
-- o.smarttab = true
|
||||
-- o.shiftwidth = 4
|
||||
-- o.tabstop = 4
|
||||
-- o.ai = true
|
||||
-- o.si = true
|
||||
--
|
||||
-- nvim_create_user_command("InsertTodayHeader", ':pu=strftime("# %a %d %b %Y")', {})
|
||||
--
|
||||
|
||||
vim.opt.compatible = false
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "v:lua.MyCustomFoldExpr()"
|
||||
@@ -23,7 +8,8 @@ vim.diagnostic.config({ virtual_text = true })
|
||||
function _G.MyCustomFoldExpr()
|
||||
local line = vim.fn.getline(vim.v.lnum)
|
||||
if line:match("::$") then
|
||||
return "=" -- keep the same fold level as the previous line
|
||||
return "="
|
||||
end
|
||||
return vim.treesitter.foldexpr()
|
||||
local ok, result = pcall(vim.treesitter.foldexpr)
|
||||
return ok and result or "0"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user