-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
30 lines (26 loc) · 819 Bytes
/
init.lua
File metadata and controls
30 lines (26 loc) · 819 Bytes
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
-- ~/.config/nvim/init.lua
-- Type: Config
-- Purpose: Neovim entry point; sets leader keys, loads core configuration, and bootstraps plugin manager
-- Docs: https://github.com/folke/lazy.nvim
-- Set leader keys early
vim.g.mapleader = " "
vim.g.maplocalleader = " "
-- Load core configuration
require("config.options")
require("config.keymaps")
require("config.autocommands")
vim.api.nvim_create_autocmd("BufWritePre", {
callback = function(args)
local clients = vim.lsp.get_clients({ bufnr = args.buf })
for _, client in ipairs(clients) do
if type(client.name) ~= "string" then
vim.notify(
"Malformed LSP client detected at BufWritePre: " .. vim.inspect(client),
vim.log.levels.ERROR
)
end
end
end,
})
-- Setup plugin manager
require("config.lazy")