personal changes

This commit is contained in:
Sakamoto Hiroshi
2024-06-22 13:10:22 -05:00
parent aad624221a
commit 70167bf1c8
6 changed files with 138 additions and 31 deletions
+28
View File
@@ -28,12 +28,40 @@ require("lazy").setup({
{ import = "plugins" },
}, lazy_config)
-- load plugins manually
require("neogit").setup{}
require("gitmoji").setup({})
-- load theme
dofile(vim.g.base46_cache .. "defaults")
dofile(vim.g.base46_cache .. "statusline")
require "nvchad.autocmds"
-- shell
vim.opt.shell = "/bin/fish"
-- Disable inline diagnostics (virtual text)
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = false,
}
)
-- Function to show diagnostics in a floating window on hover
local function show_diagnostics_on_hover()
local opts = {
focusable = false,
close_events = { "BufLeave", "CursorMoved", "InsertEnter", "FocusLost" },
border = 'rounded',
source = 'always',
prefix = ' ',
}
vim.api.nvim_command('autocmd CursorHold * lua vim.diagnostic.open_float(nil, ' .. vim.inspect(opts) .. ')')
end
-- Call the function to set up the autocmd
show_diagnostics_on_hover()
vim.schedule(function()
require "mappings"
end)