2022-07-27 16:13:09 +00:00
|
|
|
if has('nvim') && !exists("g:vscode")
|
2022-04-29 19:56:19 +00:00
|
|
|
lua << EOF
|
|
|
|
vim.diagnostic.config({
|
|
|
|
virtual_text = false,
|
|
|
|
signs = true,
|
|
|
|
underline = true,
|
|
|
|
update_in_insert = false,
|
|
|
|
severity_sort = false,
|
|
|
|
})
|
|
|
|
|
|
|
|
vim.o.updatetime = 300
|
|
|
|
|
|
|
|
-- Show all diagnostics on current line in floating window
|
|
|
|
--vim.api.nvim_set_keymap(
|
|
|
|
-- 'n', '<Leader>d', ':lua vim.diagnostic.open_float()<CR>',
|
|
|
|
-- { noremap = true, silent = true }
|
|
|
|
--)
|
|
|
|
-- Go to next diagnostic (if there are multiple on the same line, only shows
|
|
|
|
-- one at a time in the floating window)
|
|
|
|
--vim.api.nvim_set_keymap(
|
|
|
|
-- 'n', '<Leader>n', ':lua vim.diagnostic.goto_next()<CR>',
|
|
|
|
-- { noremap = true, silent = true }
|
|
|
|
--)
|
|
|
|
-- Go to prev diagnostic (if there are multiple on the same line, only shows
|
|
|
|
-- one at a time in the floating window)
|
|
|
|
--vim.api.nvim_set_keymap(
|
|
|
|
-- 'n', '<Leader>p', ':lua vim.diagnostic.goto_prev()<CR>',
|
|
|
|
-- { noremap = true, silent = true }
|
|
|
|
--)
|
|
|
|
|
2022-07-27 16:13:09 +00:00
|
|
|
-- IMPORTANT!: this is only a showcase of how you can set default options!
|
|
|
|
require("telescope").setup {
|
|
|
|
extensions = {
|
|
|
|
file_browser = {
|
|
|
|
grouped = true,
|
|
|
|
theme = "ivy",
|
|
|
|
mappings = {
|
|
|
|
["i"] = {
|
|
|
|
-- your custom insert mode mappings
|
|
|
|
},
|
|
|
|
["n"] = {
|
|
|
|
-- your custom normal mode mappings
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
-- To get telescope-file-browser loaded and working with telescope,
|
|
|
|
-- you need to call load_extension, somewhere after setup function:
|
|
|
|
require("telescope").load_extension "file_browser"
|
|
|
|
|
2022-04-29 19:56:19 +00:00
|
|
|
EOF
|
|
|
|
endif
|
2022-07-27 16:13:09 +00:00
|
|
|
|