feat: integrate nvim-lspconfig with clangd offset encoding
This commit is contained in:
+15
-15
@@ -22,16 +22,16 @@ return {
|
|||||||
-- stylua: ignore start
|
-- stylua: ignore start
|
||||||
dashboard.section.buttons.val = {
|
dashboard.section.buttons.val = {
|
||||||
---@diagnostic disable: param-type-mismatch
|
---@diagnostic disable: param-type-mismatch
|
||||||
dashboard.button("f", " " .. " Find file", LazyVim.pick()),
|
dashboard.button("f", " " .. " Find file", LazyVim.pick()),
|
||||||
dashboard.button("n", " " .. " New file", [[<cmd> ene <BAR> startinsert <cr>]]),
|
dashboard.button("n", " " .. " New file", [[<cmd> ene <BAR> startinsert <cr>]]),
|
||||||
dashboard.button("r", " " .. " Recent files", LazyVim.pick("oldfiles")),
|
dashboard.button("r", " " .. " Recent files", LazyVim.pick("oldfiles")),
|
||||||
dashboard.button("g", " " .. " Grep text", LazyVim.pick("live_grep")),
|
dashboard.button("g", " " .. " Grep text", LazyVim.pick("live_grep")),
|
||||||
dashboard.button("z", " " .. " LazyGit", "<cmd> LazyGit <cr>"),
|
dashboard.button("z", " " .. " LazyGit", "<cmd> LazyGit <cr>"),
|
||||||
dashboard.button("c", " " .. " Config", LazyVim.pick.config_files()),
|
dashboard.button("c", " " .. " Config", LazyVim.pick.config_files()),
|
||||||
dashboard.button("s", " " .. " Restore Session", [[<cmd> lua require("persistence").load() <cr>]]),
|
dashboard.button("s", " " .. " Restore Session", [[<cmd> lua require("persistence").load() <cr>]]),
|
||||||
dashboard.button("S", " " .. " Remote Session", [[<cmd> lua require("config.rootiest").load_remote() <cr>]]),
|
dashboard.button("S", " " .. " Remote Session", [[<cmd> lua require("config.rootiest").load_remote() <cr>]]),
|
||||||
dashboard.button("l", " " .. " Lazy", "<cmd> Lazy <cr>"),
|
dashboard.button("l", " " .. " Lazy", "<cmd> Lazy <cr>"),
|
||||||
dashboard.button("q", " " .. " Quit", "<cmd> qa <cr>"),
|
dashboard.button("q", " " .. " Quit", "<cmd> qa <cr>"),
|
||||||
}
|
}
|
||||||
-- stylua: ignore end
|
-- stylua: ignore end
|
||||||
for _, button in ipairs(dashboard.section.buttons.val) do
|
for _, button in ipairs(dashboard.section.buttons.val) do
|
||||||
@@ -66,12 +66,12 @@ return {
|
|||||||
local stats = require("lazy").stats()
|
local stats = require("lazy").stats()
|
||||||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||||
dashboard.section.footer.val = "⚡ Neovim loaded "
|
dashboard.section.footer.val = "⚡ Neovim loaded "
|
||||||
.. stats.loaded
|
.. stats.loaded
|
||||||
.. "/"
|
.. "/"
|
||||||
.. stats.count
|
.. stats.count
|
||||||
.. " plugins in "
|
.. " plugins in "
|
||||||
.. ms
|
.. ms
|
||||||
.. "ms"
|
.. "ms"
|
||||||
pcall(vim.cmd.AlphaRedraw)
|
pcall(vim.cmd.AlphaRedraw)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|||||||
+15
-3
@@ -10,12 +10,19 @@ return {
|
|||||||
automatic_installation = true,
|
automatic_installation = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
opts = {
|
||||||
|
setup = {
|
||||||
|
clangd = function(_, opts)
|
||||||
|
opts.capabilities.offsetEncoding = { "utf-16" }
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{ -- Yanky
|
{ -- Yanky
|
||||||
import = "lazyvim.plugins.extras.coding.yanky",
|
import = "lazyvim.plugins.extras.coding.yanky",
|
||||||
},
|
},
|
||||||
{ -- Mini Surround
|
|
||||||
import = "lazyvim.plugins.extras.coding.mini-surround",
|
|
||||||
},
|
|
||||||
{ -- VSCode
|
{ -- VSCode
|
||||||
import = "lazyvim.plugins.extras.vscode",
|
import = "lazyvim.plugins.extras.vscode",
|
||||||
},
|
},
|
||||||
@@ -61,4 +68,9 @@ return {
|
|||||||
mappings = data.keys.splitjoin,
|
mappings = data.keys.splitjoin,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{ -- mini-surround
|
||||||
|
"echasnovski/mini.surround",
|
||||||
|
opts = {},
|
||||||
|
keys = data.keys.surround,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user