LazyVim一些配置问题
解决Tmux和LazyVIm的键位冲突
- 在文件
.local/share/nvim/lazy/LazyVim/lua/lazyvim/config/keymaps.lua
中
-- map("n", "<C-h>", "<C-w>h", { desc = "Go to left window", remap = true })
-- map("n", "<C-j>", "<C-w>j", { desc = "Go to lower window", remap = true })
-- map("n", "<C-k>", "<C-w>k", { desc = "Go to upper window", remap = true })
-- map("n", "<C-l>", "<C-w>l", { desc = "Go to right window", remap = true })
-- map("t", "<C-h>", "<cmd>wincmd h<cr>", { desc = "Go to left window" })
-- map("t", "<C-j>", "<cmd>wincmd j<cr>", { desc = "Go to lower window" })
-- map("t", "<C-k>", "<cmd>wincmd k<cr>", { desc = "Go to upper window" })
-- map("t", "<C-l>", "<cmd>wincmd l<cr>", { desc = "Go to right window" })
注释掉这几行代码,然后重新加载配置文件即可。
处理LazyVim中clangd配置
- 在文件
.local/share/nvim/lazy/LazyVim/lua/lazy/nvim-lspconfig/lua/lspconfig/server_configrations/clang.lua
中
local default_capabilities = {
textDocument = {
completion = {
editsNearCursor = true,
},
},
offsetEncoding = { 'utf-16' },
}