Repository navigation
Expand file tree
/
Copy pathinit.lua
More file actions
34 lines (32 loc) · 1.48 KB
/
Copy pathinit.lua
File metadata and controls
34 lines (32 loc) · 1.48 KB
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
----------------------------------------------------------------------------
--[[ 基本 配置 ]]
----------------------------------------------------------------------------
require("config.options")
require("config.keymaps")
----------------------------------------------------------------------------
--[[ 插件 配置 ]]
----------------------------------------------------------------------------
-- 自动加载 plugins 目录下的所有 lua 文件
-- automatically finds them and merges them with any local lsp/*.lua
local plugins_dir = vim.fn.stdpath("config") .. "/lua/plugins"
local plugin_files = vim.split(vim.fn.glob(plugins_dir .. "/*.lua"), "\n")
for _, file in ipairs(plugin_files) do
if file ~= "" then
local plugin_name = vim.fn.fnamemodify(file, ":t:r")
require("plugins." .. plugin_name)
end
end
----------------------------------------------------------------------------
--[[ LSP 配置 ]]
----------------------------------------------------------------------------
-- 先取消默认LSP keymap
vim.keymap.del("n", "gra")
vim.keymap.del("n", "gri")
vim.keymap.del("n", "grn")
vim.keymap.del("n", "grr")
vim.keymap.del("n", "grt")
-- 使用 nvim-lspconfig 配置 lsp
local servers = { "lua_ls", "clangd", "basedpyright", "asm_lsp", "neocmake" }
for _, lsp in ipairs(servers) do
vim.lsp.enable(lsp)
end