many changes

This commit is contained in:
2025-01-26 10:55:38 +01:00
parent 12ef36af33
commit a2d482e16d
98 changed files with 419 additions and 27402 deletions

View File

@@ -5,8 +5,8 @@ self: super: {
version = "1.0.0";
src = super.fetchgit {
url = "https://git.cloonar.com/Cloonar/chatgpt.vim.git";
rev = "162ab2d82054897ac0d371d7047811abcd510ab5";
sha256 = "sha256-0BvVCGXO4GAUumv36+/9/S8pGMKCl/V3rxEKeiKW5xo=";
rev = "59540981edeebd7faf9894e2ba40cbe4fb02f31c";
sha256 = "sha256-uBfdR8ezwrcPJeCs+hAnz0w7nE9N8rfqST/SuGlcoTs=";
};
};
};

View File

@@ -42,7 +42,7 @@ vim.opt.titlestring = "%<%F%=%l/%L - nvim" -- what the title of the window will
vim.opt.undodir = vim.fn.stdpath "cache" .. "/undo"
vim.opt.undofile = true -- enable persistent undo
vim.opt.updatetime = 300 -- faster completion
vim.opt.writebackup = false -- if a file is being edited by another program (or was written to file while editing with another program) it is not allowed to be edited
vim.opt.writebackup = false -- if a file is being edited by another program it is not allowed to be edited
vim.opt.expandtab = true -- convert tabs to spaces
vim.opt.shiftwidth = 2 -- the number of spaces inserted for each indentation
vim.opt.tabstop = 2 -- insert 2 spaces for a tab
@@ -50,9 +50,38 @@ vim.opt.cursorline = true -- highlight the current line
vim.opt.number = true -- set numbered lines
vim.opt.relativenumber = false -- set relative numbered lines
vim.opt.numberwidth = 4 -- set number column width to 2 {default 4}
vim.opt.signcolumn = "yes" -- always show the sign column otherwise it would shift the text each time
vim.opt.signcolumn = "yes" -- always show the sign column otherwise text shifts each time
vim.opt.wrap = false -- display lines as one long line
vim.opt.spell = false
vim.opt.spelllang = "en"
vim.opt.scrolloff = 8 -- is one of my fav
vim.opt.scrolloff = 8 -- keep 8 lines above/below the cursor
vim.opt.sidescrolloff = 8
-- Automatically disable heavy features for very large files
local largefile_group = vim.api.nvim_create_augroup("LargeFile", { clear = true })
vim.api.nvim_create_autocmd("BufReadPre", {
group = largefile_group,
pattern = "*",
callback = function(args)
local max_filesize = 1 * 1024 * 1024 -- 1 MB in bytes
local file = vim.fn.expand("<afile>")
if vim.fn.getfsize(file) > max_filesize then
-- Turn off syntax highlighting
vim.cmd("syntax off")
-- Disable Treesitter's highlight for this buffer
pcall(vim.cmd, "TSBufDisable highlight")
-- Optionally disable LSP for this buffer
for _, client in pairs(vim.lsp.get_active_clients()) do
if client ~= nil and client.attached_buffers[args.buf] then
client.detach(args.buf)
end
end
-- You can also disable or reduce other settings if needed, e.g.:
vim.opt.foldmethod = "manual"
vim.opt.wrap = false
vim.opt.hlsearch = false
end
end,
})