17 lines
524 B
Lua
17 lines
524 B
Lua
return {
|
|
{
|
|
"neovim/nvim-lspconfig",
|
|
init = function()
|
|
local format = function()
|
|
require("lazyvim.plugins.lsp.format").format({ force = true })
|
|
end
|
|
|
|
local keys = require("lazyvim.plugins.lsp.keymaps").get()
|
|
keys[#keys + 1] = { "<leader>lf", format, desc = "Format Document", has = "documentFormatting" }
|
|
keys[#keys + 1] = { "<leader>lf", format, desc = "Format Range", mode = "v", has = "documentRangeFormatting" }
|
|
end,
|
|
opts = {
|
|
autoformat = false,
|
|
},
|
|
},
|
|
}
|