✨ personal changes
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user