From 835d4e15c5eb1d9fc3978dca23cbd25e105c38c4 Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Thu, 6 Mar 2025 08:47:00 +0100 Subject: [PATCH 1/5] removed some terminal key-bindings --- init.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/init.lua b/init.lua index 8b77098..a7c426d 100644 --- a/init.lua +++ b/init.lua @@ -46,8 +46,6 @@ vim.cmd [[ nnoremap ,cD :call setqflist(filter(getqflist(), 'v:val != getqflist()[getqflist({"idx": 0}).idx - 1]')) - tnoremap - autocmd BufEnter * if &buftype == 'terminal' | :startinsert | endif nnoremap ,t vl:terminala " Don't include curdir, it just causes pain. From 7e1134b15c5f60b9476422d662a8ca155173c49c Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Thu, 6 Mar 2025 08:47:20 +0100 Subject: [PATCH 2/5] added lazygit.nvim --- init.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/init.lua b/init.lua index a7c426d..b8aa7c2 100644 --- a/init.lua +++ b/init.lua @@ -316,6 +316,12 @@ require'lazy'.setup{ --{{{1 } end, }, + { "kdheepak/lazygit.nvim", --{{{2 + lazy = true, + cmd = { "LazyGit", "LazyGitConfig", "LazyGitCurrentFile", "LazyGitFilter", "LazyGitFilterCurrentFile", }, + dependencies = { "nvim-lua/plenary.nvim", }, + keys = { { ",g", "LazyGit", desc = "LazyGit" }, }, + }, { 'mfussenegger/nvim-dap', --{{{2 dependencies = { 'nvim-treesitter/nvim-treesitter', From 92d02bccaeae9723570047d7f4459ebe01ee1129 Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Thu, 6 Mar 2025 09:28:21 +0100 Subject: [PATCH 3/5] Fix stupid indentation default for c-like languages --- init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.lua b/init.lua index b8aa7c2..d4d8727 100644 --- a/init.lua +++ b/init.lua @@ -79,6 +79,8 @@ vim.g.python_indent = { -- Fixes retarded default python indentation. closed_paren_align_last_line = false, searchpair_timeout = 300, } +-- Fix retarded default indenting for c-like languages +vim.o.cinoptions = vim.o.cinoptions .. "(s" local function file_exists(name) --{{{1 local f = io.open(name,"r") From a50ee0cc182fceadf65930812cd6fd2eff4def7c Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Thu, 6 Mar 2025 09:52:49 +0100 Subject: [PATCH 4/5] removed fix that did not fix anything and added TODO --- init.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/init.lua b/init.lua index d4d8727..d077ec0 100644 --- a/init.lua +++ b/init.lua @@ -79,8 +79,7 @@ vim.g.python_indent = { -- Fixes retarded default python indentation. closed_paren_align_last_line = false, searchpair_timeout = 300, } --- Fix retarded default indenting for c-like languages -vim.o.cinoptions = vim.o.cinoptions .. "(s" +-- TODO fix all the idiotic default indentation settings local function file_exists(name) --{{{1 local f = io.open(name,"r") From b56f83927cf5d0a9c59bf8fea5ba530403a9b33b Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Thu, 6 Mar 2025 10:36:47 +0100 Subject: [PATCH 5/5] will now use treesitters auto-indentation or only the default 'dumb' one if indentation is not supported. --- init.lua | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/init.lua b/init.lua index d077ec0..5691da7 100644 --- a/init.lua +++ b/init.lua @@ -69,17 +69,10 @@ vim.cmd [[ autocmd BufEnter *__virtual* setlocal buftype=nofile bufhidden=hide noswapfile let g:rustfmt_autosave = 1 -]] -vim.g.c_syntax_for_h = 1 -vim.g.python_indent = { -- Fixes retarded default python indentation. - open_paren = 'shiftwidth()', - nested_paren = 'shiftwidth()', - continue = 'shiftwidth()', - closed_paren_align_last_line = false, - searchpair_timeout = 300, -} --- TODO fix all the idiotic default indentation settings + " remove annoying and bad indentation + autocmd FileType * setlocal indentexpr= +]] local function file_exists(name) --{{{1 local f = io.open(name,"r") @@ -310,6 +303,9 @@ require'lazy'.setup{ --{{{1 ensure_installed = "all", sync_install = false, auto_install = true, + indent = { + enable = true, + }, highlight = { enable = true, additional_vim_regex_highlighting = false,