52 lines
1.3 KiB
Lua
52 lines
1.3 KiB
Lua
|
-- http://vimcasts.org/episodes/meet-neovim/
|
||
|
-- `^=` means prepend
|
||
|
vim.api.nvim_command('set runtimepath^=~/.vim')
|
||
|
vim.opt.runtimepath:append(",~/.vim/after")
|
||
|
vim.api.nvim_command('let &packpath = &runtimepath')
|
||
|
|
||
|
require("plugins")
|
||
|
|
||
|
vim.cmd.source("~/.config/nvim/init.old.vim")
|
||
|
|
||
|
-- Colorscheme --
|
||
|
vim.cmd([[colorscheme base16-gruvbox-dark-pale]])
|
||
|
|
||
|
|
||
|
-- Sets how long the cursor needs to wait before showing the diagnostic modal
|
||
|
vim.o.updatetime = 250
|
||
|
|
||
|
vim.diagnostic.config({
|
||
|
virtual_text = false,
|
||
|
signs = true,
|
||
|
underline = true,
|
||
|
update_in_insert = false,
|
||
|
severity_sort = true,
|
||
|
})
|
||
|
|
||
|
-- Show code diagnostics in a floating window instead of inline
|
||
|
-- https://github.com/neovim/nvim-lspconfig/wiki/UI-Customization#show-line-diagnostics-automatically-in-hover-window
|
||
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||
|
callback = function(args)
|
||
|
vim.api.nvim_create_autocmd("CursorHold", {
|
||
|
buffer = bufnr,
|
||
|
callback = function()
|
||
|
local opts = {
|
||
|
focusable = false,
|
||
|
close_events = { "BufLeave", "CursorMoved", "InsertEnter", "FocusLost" },
|
||
|
border = 'rounded',
|
||
|
source = 'always',
|
||
|
prefix = ' ',
|
||
|
scope = 'cursor',
|
||
|
}
|
||
|
vim.diagnostic.open_float(nil, opts)
|
||
|
end
|
||
|
})
|
||
|
end,
|
||
|
})
|
||
|
|
||
|
|
||
|
require("plugins-config")
|
||
|
require("keys")
|
||
|
|
||
|
|