Initial LSP setup with formatting and autocompletion

This commit is contained in:
2026-06-01 12:46:46 +04:00
commit fd3267ca21
13 changed files with 263 additions and 0 deletions

21
lua/formatting.lua Normal file
View File

@@ -0,0 +1,21 @@
local conform = require("conform")
---@type conform.setupOpts
local options = {
formatters_by_ft = {
lua = { "stylua" },
},
format_on_save = {
timeout_ms = 500,
lsp_format = "fallback",
},
}
vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*",
callback = function(args)
conform.format({ bufnr = args.buf })
end,
})
conform.setup(options)