Add: format keybind

This commit is contained in:
agryphus 2026-02-04 12:20:42 -05:00
parent 0beaaf14b7
commit ec37d03c65

View file

@ -1,13 +1,6 @@
-- LANGUAGE SERVERS
local lsp_zero = require('lsp-zero')
local lsp_capabilities = require("cmp_nvim_lsp").default_capabilities()
lsp_zero.on_attach(function(client, bufnr)
-- see :help lsp-zero-keybindings
-- to learn the available actions
lsp_zero.default_keymaps({buffer = bufnr})
end)
-- LUA
vim.lsp.config('lua_ls', {
settings = {
@ -60,6 +53,10 @@ vim.keymap.set("n", "<leader>gf", ":GoFmt<CR>",
{ noremap = true, silent = true, desc = "Go Format" }
)
vim.keymap.set("n", "<leader>ff", "<cmd>lua vim.lsp.buf.format()<CR>",
{ desc = "Format Code" }
)
-- AUTOCOMPLETION
local cmp = require('cmp')