nvim/psoxizsh: move PsoxFileAutos to early config
As otherwise it appears they load too late, and will sporadically be ignored when loading files.
This commit is contained in:
parent
0553bbc116
commit
7a1ce7b98a
|
@ -77,6 +77,13 @@ local function psoxizsh_early_config()
|
||||||
-- Setup vim.diagnostic APIs
|
-- Setup vim.diagnostic APIs
|
||||||
diagnostic.setup {}
|
diagnostic.setup {}
|
||||||
|
|
||||||
|
au.PsoxFileAutos {
|
||||||
|
{ 'FileType', 'yaml', function() cmd 'setlocal indentkeys-=<:> ts=8 sts=2 sw=2 expandtab' end },
|
||||||
|
{ 'FileType', 'go', function() cmd 'setlocal ts=8 sts=4 sw=4 noexpandtab' end },
|
||||||
|
{ 'FileType', 'quickfix,netrw', 'setlocal nobuflisted' },
|
||||||
|
{ 'FileType', 'netrw', function() keys.Global.N.CloseNetrw:register { buffer = true } end },
|
||||||
|
}
|
||||||
|
|
||||||
-- Local pre plugin configuration
|
-- Local pre plugin configuration
|
||||||
util.try_mreload('pre')
|
util.try_mreload('pre')
|
||||||
end
|
end
|
||||||
|
@ -103,7 +110,6 @@ local function psoxizsh_post_config(plugs)
|
||||||
-- Other
|
-- Other
|
||||||
g.rainbow_active = 1
|
g.rainbow_active = 1
|
||||||
|
|
||||||
local CloseNetrw = keys.Buffer.N.CloseNetrw
|
|
||||||
cmd([[
|
cmd([[
|
||||||
function! CloseNetrw() abort
|
function! CloseNetrw() abort
|
||||||
for bufn in range(1, bufnr('$'))
|
for bufn in range(1, bufnr('$'))
|
||||||
|
@ -117,14 +123,7 @@ local function psoxizsh_post_config(plugs)
|
||||||
endfor
|
endfor
|
||||||
endfunction
|
endfunction
|
||||||
]])
|
]])
|
||||||
CloseNetrw { action = fn.CloseNetrw }
|
keys.Buffer.N.CloseNetrw { action = fn.CloseNetrw }
|
||||||
|
|
||||||
au.PsoxFileAutos {
|
|
||||||
{ 'FileType', 'yaml', 'setlocal indentkeys-=<:> ts=8 sts=2 sw=2 expandtab' },
|
|
||||||
{ 'FileType', 'go', 'setlocal ts=8 sts=4 sw=4 noexpandtab' },
|
|
||||||
{ 'FileType', 'quickfix,netrw', 'setlocal nobuflisted' },
|
|
||||||
{ 'FileType', 'netrw', function() CloseNetrw:register { buffer = true } end },
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Open any known user configuration paths for editing
|
-- Open any known user configuration paths for editing
|
||||||
local OpenConfig = function()
|
local OpenConfig = function()
|
||||||
|
|
Loading…
Reference in a new issue