lots
This commit is contained in:
@@ -128,7 +128,10 @@ lspconfig.pyright.setup({})
|
||||
lspconfig.ts_ls.setup({})
|
||||
lspconfig.gopls.setup({})
|
||||
lspconfig.bashls.setup({})
|
||||
lspconfig.xml.setup({})
|
||||
lspconfig.arduino_language_server.setup({})
|
||||
lspconfig.clangd.setup({})
|
||||
lspconfig.cssls.setup({})
|
||||
lspconfig.css_variables.setup({})
|
||||
local luasnip = require("luasnip")
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
require("luasnip").config.set_config({
|
||||
@@ -146,6 +149,9 @@ local opt = vim.opt
|
||||
vim.wo.number = true
|
||||
vim.wo.relativenumber = true
|
||||
|
||||
vim.keymap.set("n", "<C-tab>", "gt")
|
||||
vim.keymap.set("n", "<CS-tab>", "gT")
|
||||
|
||||
opt.tabstop = 2
|
||||
opt.shiftwidth = 2
|
||||
opt.expandtab = true
|
||||
@@ -166,6 +172,7 @@ require("conform").setup({
|
||||
go = { "gofmt" },
|
||||
bash = { "shfmt" },
|
||||
nginx = { "nginxfmt" },
|
||||
json = { "fixjson" },
|
||||
},
|
||||
format_on_save = {
|
||||
timeout_ms = 500,
|
||||
@@ -197,7 +204,9 @@ vim.diagnostic.config({
|
||||
})
|
||||
|
||||
-- save and format on insertleave
|
||||
vim.api.nvim_create_autocmd({ "InsertLeave", "FocusLost" }, {
|
||||
vim.api.nvim_create_autocmd({ --[["InsertLeave",]]
|
||||
"FocusLost",
|
||||
}, {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
require("conform").format()
|
||||
|
Reference in New Issue
Block a user