words, spaces for lua indents, spelling as hints instead of error,
This commit is contained in:
parent
55be7d4e97
commit
da4232a795
3 changed files with 314 additions and 295 deletions
|
@ -1 +1 @@
|
|||
{"language":"en","version":"0.2","flagWords":[],"words":["nvim","builtins","stylua","rustfmt","pendo","tanstack","ripgrep","Typeahead","overscan","autorun","mediatype","BIOINF","Transitioner","pkce","ilike","arrayify","arrayified","komodo","wezterm","gcloud","pbpaste","Hasher","semvers","upserted","dtos","Yeatts","Mahon","Beaubier","Taussing","chakra","langchain","openai","getattr","llms","docstore","kwargs","svgr","healthcheck","venv","virtualenv","ringofstorms","nestjs","oneshot","templating","tiktoken","pydantic","NCCN","clsx","reactflow","Convo","DSAB","pgvector"]}
|
||||
{"version":"0.2","language":"en","words":["nvim","builtins","stylua","rustfmt","pendo","tanstack","ripgrep","Typeahead","overscan","autorun","mediatype","BIOINF","Transitioner","pkce","ilike","arrayify","arrayified","komodo","wezterm","gcloud","pbpaste","Hasher","semvers","upserted","dtos","Yeatts","Mahon","Beaubier","Taussing","chakra","langchain","openai","getattr","llms","docstore","kwargs","svgr","healthcheck","venv","virtualenv","ringofstorms","nestjs","oneshot","templating","tiktoken","pydantic","NCCN","clsx","reactflow","Convo","DSAB","pgvector","postprocess","stylelua","sqlx","genemichaels","williamboman","substr","findfile","Hammerspoon","eventtap"],"flagWords":[]}
|
||||
|
|
|
@ -31,12 +31,21 @@ local servers = {
|
|||
runtime = {
|
||||
version = "LuaJIT",
|
||||
},
|
||||
workspace = { checkThirdParty = false, library = vim.api.nvim_get_runtime_file("", true) },
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
vim.api.nvim_get_runtime_file("", true),
|
||||
vim.fn.expand("$VIMRUNTIME/lua"),
|
||||
vim.fn.expand("$VIMRUNTIME/lua/vim/lsp"),
|
||||
"/Applications/Hammerspoon.app/Contents/Resources/extensions/hs/",
|
||||
},
|
||||
},
|
||||
telemetry = { enable = false },
|
||||
diagnostics = {
|
||||
globals = {
|
||||
"vim",
|
||||
"require",
|
||||
"hs",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -30,7 +30,7 @@ return {
|
|||
filetypes = { "rust" },
|
||||
generator = null_ls.formatter({
|
||||
command = "genemichaels",
|
||||
args = { '-q' },
|
||||
args = { "-q" },
|
||||
to_stdin = true,
|
||||
}),
|
||||
}
|
||||
|
@ -41,8 +41,11 @@ return {
|
|||
filetypes = { "rust" },
|
||||
generator = null_ls.formatter({
|
||||
command = "rustfmt",
|
||||
args = { '--emit=stdout', "--edition=$(grep edition Cargo.toml | awk '{print substr($3,2,length($3)-2)}')",
|
||||
'--color=never' },
|
||||
args = {
|
||||
"--emit=stdout",
|
||||
"--edition=$(grep edition Cargo.toml | awk '{print substr($3,2,length($3)-2)}')",
|
||||
"--color=never",
|
||||
},
|
||||
to_stdin = true,
|
||||
}),
|
||||
}
|
||||
|
@ -69,7 +72,9 @@ return {
|
|||
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
|
||||
config.sources = {
|
||||
null_ls.builtins.formatting.prettier, -- typescript/javascript
|
||||
null_ls.builtins.formatting.stylua, -- lua
|
||||
null_ls.builtins.formatting.stylua.with({
|
||||
extra_args = { "--indent-type", "spaces", "--indent-width", "2" },
|
||||
}), -- lua
|
||||
--null_ls.builtins.formatting.rustfmt, -- rust
|
||||
rust_formatter_genemichaels, -- order matters, run genemichaels first then rustfmt
|
||||
rust_formatter_rustfmt,
|
||||
|
@ -85,6 +90,11 @@ return {
|
|||
}),
|
||||
null_ls.builtins.diagnostics.cspell.with({
|
||||
extra_args = { "--config", "~/.config/nvim/cspell.json" },
|
||||
diagnostics_postprocess = function(diagnostic)
|
||||
-- vim.notify(vim.inspect(diagnostic))
|
||||
diagnostic.message = diagnostic.user_data.misspelled
|
||||
diagnostic.severity = vim.diagnostic.severity.HINT
|
||||
end,
|
||||
}),
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue