From 8106b33e769bf47c9c4c9ad5c2ed0afb2cb7db31 Mon Sep 17 00:00:00 2001 From: Jeremie Fraeys Date: Mon, 23 Mar 2026 20:32:26 -0400 Subject: [PATCH] refactor: core configuration cleanup - Refactor init.lua structure - Update options.lua settings - Adjust .luacheckrc for new config --- .luacheckrc | 9 +++++---- init.lua | 9 +-------- lua/config/options.lua | 19 ++++++++----------- 3 files changed, 14 insertions(+), 23 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index 6a26429..39bcc64 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -1,16 +1,17 @@ -- luacheck config for Neovim -std = "lua51" +local std = 'lua51' globals = { - "vim", + 'vim', } ignore = { - "631", + '631', } self = false exclude_files = { - "lua/custom/plugins/lazy.lua", + 'lua/custom/plugins/lazy.lua', } } + diff --git a/init.lua b/init.lua index 7f1750e..75d8f72 100755 --- a/init.lua +++ b/init.lua @@ -1,11 +1,4 @@ --- Disable netrw before anything else loads -vim.g.loaded_netrw = 1 -vim.g.loaded_netrwPlugin = 1 -vim.g.loaded_netrwSettings = 1 -vim.g.loaded_netrwFileHandlers = 1 - --- Set colorscheme early to prevent startup flash (auto-dark-mode will switch this) -vim.cmd('colorscheme habamax') +require('config.preconfig') -- Install package manager -- https://github.com/folke/lazy.nvim diff --git a/lua/config/options.lua b/lua/config/options.lua index e623d6a..008ff52 100755 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -4,8 +4,8 @@ local g = vim.g g.ftplugin_migrated_all = true local opts = { - -- Change cursor in insert mode - guicursor = '', + + guicursor = 'a:block-blinkwait0-blinkon0-blinkoff0', -- set terminal tab title title = true, @@ -19,9 +19,6 @@ local opts = { --Enable noshowmode showmode = false, - -- Enable lazy redraw - lazyredraw = true, - -- Enable break indent breakindent = true, @@ -49,7 +46,7 @@ local opts = { smartcase = true, -- Decrease update time - updatetime = 50, + updatetime = 250, timeoutlen = 300, -- Set completeopt to have a better completion experience @@ -58,7 +55,6 @@ local opts = { -- NOTE: You should make sure your terminal supports this termguicolors = true, scrolloff = 10, - pyxversion = 3, -- Sets how neovim will display certain whitespace characters in the editor. -- See :help 'list' @@ -116,9 +112,11 @@ end local global_let_opts = { loaded_python_provider = 0, loaded_python3_provider = 0, + loaded_node_provider = 0, + loaded_perl_provider = 0, + loaded_ruby_provider = 0, python_host_skip_check = 1, python3_host_skip_check = 1, - python3_host_prog = '/usr/local/bin/python3', EditorConfig_core_mode = 'external_command', matchparen_timeout = 20, matchparen_insert_timeout = 20, @@ -140,13 +138,12 @@ opt.formatoptions = opt.formatoptions - '2' -- I'm not in gradeschool anymore opt.iskeyword:append('_') --- Open oil.nvim when starting with a directory (defer to prevent flash) vim.api.nvim_create_autocmd('VimEnter', { callback = function() if vim.fn.isdirectory(vim.fn.expand('%:p')) == 1 then - vim.schedule(function() + vim.defer_fn(function() require('oil').open(vim.fn.expand('%:p')) - end) + end, 100) end end, })