feat(lsp): change from eslint/prettier to oxlint/oxfmt

This commit is contained in:
2026-03-06 05:47:45 +01:00
parent 4d22ec6939
commit f6a21cb88b
6 changed files with 21 additions and 44 deletions
-19
View File
@@ -1,19 +0,0 @@
local lsp = require("lsp")
---@type vim.lsp.Config
return {
on_attach = function(client, bufnr)
lsp.on_attach(client, bufnr)
vim.keymap.set("n", "<leader>lf", function()
vim.lsp.buf.format()
require("util").format({
buf = bufnr,
cmd = {
"prettier",
"--stdin-filepath",
"%file%",
},
})
end, { buffer = bufnr })
end,
}
+3
View File
@@ -0,0 +1,3 @@
---@type vim.lsp.Config
return {
}
+3
View File
@@ -0,0 +1,3 @@
---@type vim.lsp.Config
return {
}
+11 -23
View File
@@ -121,9 +121,6 @@ vim.api.nvim_create_autocmd("FileType", {
desc = "Use two space indent for C++ files",
pattern = { "cpp" },
callback = function()
vim.bo.tabstop = 2
vim.bo.softtabstop = 2
vim.bo.shiftwidth = 2
vim.bo.cinoptions = "g0"
end,
})
@@ -178,15 +175,7 @@ vim.api.nvim_create_autocmd("FileType", {
})
vim.api.nvim_create_autocmd("FileType", {
pattern = "xml",
callback = function()
vim.bo.tabstop = 2
vim.bo.softtabstop = 2
vim.bo.shiftwidth = 2
end,
})
vim.api.nvim_create_autocmd("FileType", {
desc = "2-space indent",
pattern = {
"json",
"jsonc",
@@ -195,17 +184,16 @@ vim.api.nvim_create_autocmd("FileType", {
"css",
"scss",
"less",
"typescript",
"typescriptreact",
"javascript",
"javascriptreact",
"xml",
"cpp",
},
callback = function(ev)
vim.keymap.set("n", "<leader>lf", function()
require("util").format({
buf = ev.buf,
cmd = {
"prettier",
"--stdin-filepath",
"%file%",
},
})
end, { buffer = ev.buf })
callback = function()
vim.bo.tabstop = 2
vim.bo.softtabstop = 2
vim.bo.shiftwidth = 2
end,
})
+2 -1
View File
@@ -73,7 +73,6 @@ function M.setup()
"bashls",
"clangd",
"cmake",
"eslint",
"gopls",
-- "hyprls",
"intelephense",
@@ -82,6 +81,8 @@ function M.setup()
-- "xml_ls",
"lua_ls",
"mesonlsp",
"oxfmt",
"oxlint",
-- "phpactor",
-- "pyrefly",
"pyright",
+2 -1
View File
@@ -16,7 +16,6 @@ return {
"cmake-language-server",
dependencies = { "golines" },
},
"eslint-lsp",
"gopls",
"hyprls",
{
@@ -33,6 +32,8 @@ return {
dependencies = { "stylua" },
},
"mesonlsp",
"oxfmt",
"oxlint",
"ruff",
"pyright",
"pyrefly",