Compare commits

...

3 commits

Author SHA1 Message Date
6fa3768d6d Avoid real-time rust analyzer 2025-03-08 17:17:10 +01:00
62dbab2600 Query driver for clangd 2025-03-08 17:12:20 +01:00
22bdd0eb7f Format .cjs 2025-03-04 20:03:28 +01:00
3 changed files with 10 additions and 4 deletions

View file

@ -3,7 +3,7 @@ require('nvim-format-buffer').setup({
format_rules = { format_rules = {
{ pattern = { '*.c', '*.h' }, command = 'clang-format' }, { pattern = { '*.c', '*.h' }, command = 'clang-format' },
{ {
pattern = { '*.js', '*.mjs', '*.ts', '*.mts', '*.tsx', '*.vue', '*.css' }, pattern = { '*.js', '*.mjs', '*.ts', '*.mts', '*.cjs', '*.tsx', '*.vue', '*.css' },
command = function() command = function()
return 'prettier --stdin-filepath ' .. vim.api.nvim_buf_get_name(0) return 'prettier --stdin-filepath ' .. vim.api.nvim_buf_get_name(0)
end, end,

View file

@ -3,7 +3,8 @@ local cmd = {
bin_name, bin_name,
"--background-index", "--background-index",
"--suggest-missing-includes", "--suggest-missing-includes",
"--enable-config" "--enable-config",
"--query-driver=/usr/lib64/ccache/*,/usr/bin/*",
} }
local config = vim.fs.find(".clangd", { local config = vim.fs.find(".clangd", {

View file

@ -18,10 +18,15 @@ if next(config) then
settings = { settings = {
["rust-analyzer"] = { ["rust-analyzer"] = {
checkOnSave = { checkOnSave = {
command = "clippy" command = "clippy",
enable = true
},
diagnostics = {
enable = false,
}, },
check = { check = {
command = "check" command = "check",
extraArgs = {"--all-features"}
}, },
}, },
}, },