Remove opencode, ignore doc folder in telescope, remove :W, add mask as runner
This commit is contained in:
@@ -6,10 +6,12 @@ vim.cmd 'au BufRead,BufNewFile *.kdl set filetype=kdl'
|
||||
|
||||
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]
|
||||
|
||||
vim.cmd 'command W :execute \':silent w !sudo tee % > /dev/null\' | :edit!'
|
||||
-- I don't know why but whenever I accidentally type :W instead of :w, I slows down the ide and reverts all changes
|
||||
-- It doesn't even save files with sudo...
|
||||
-- vim.cmd 'command W :execute \':silent w !sudo tee % > /dev/null\' | :edit!'
|
||||
|
||||
-- Array of file names indicating root directory. Modify to your liking.
|
||||
local root_names = { '.git', 'Makefile', 'justfile' }
|
||||
local root_names = { '.git', 'Makefile', 'justfile', 'CMakeLists.txt', 'maskfile.md' }
|
||||
|
||||
-- Cache to use for speed up (at cost of possibly outdated results)
|
||||
local root_cache = {}
|
||||
@@ -43,6 +45,8 @@ local function set_makeprg()
|
||||
vim.o.makeprg = 'just'
|
||||
elseif vim.fn.filereadable(cwd .. '/Makefile') == 1 then
|
||||
vim.o.makeprg = 'make'
|
||||
elseif vim.fn.filereadable(cwd .. '/maskfile.md') == 1 then
|
||||
vim.o.makeprg = 'mask'
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user