refactor: core configuration cleanup
- Refactor init.lua structure - Update options.lua settings - Adjust .luacheckrc for new config
This commit is contained in:
parent
f4d20a2ce2
commit
8106b33e76
3 changed files with 14 additions and 23 deletions
|
|
@ -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', }
|
||||
}
|
||||
|
||||
|
|
|
|||
9
init.lua
9
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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue