-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
35 lines (27 loc) · 1007 Bytes
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
vim.g.mapleader = ' '
vim.g.maplocalleader = '\\'
vim.g.have_nerd_font = true -- Set to true if you have a Nerd Font installed
-- [[ Setting options ]]
require 'config.options'
-- [[ Basic Keymaps ]]
require 'config.keymaps'
-- [[ Basic Autocommands ]]
require 'config.autocmds'
-- [[ Load util functions ]]
_G.Utils = require 'utility'
-- [[ Install `lazy.nvim` plugin manager ]]
-- handles plugins in lua/plugins/
require 'config.lazy_setup'
require 'config.colorscheme'
-- workaround for rust-analyzer server cancelled request
for _, method in ipairs { 'textDocument/diagnostic', 'workspace/diagnostic' } do
local default_diagnostic_handler = vim.lsp.handlers[method]
vim.lsp.handlers[method] = function(err, result, context, config)
if err ~= nil and err.code == -32802 then
return
end
return default_diagnostic_handler(err, result, context, config)
end
end