clippy by default
This commit is contained in:
parent
e7f7ad4ca8
commit
10a01d0503
|
@ -5,8 +5,8 @@ local M = {}
|
|||
local highlights = require "custom.highlights"
|
||||
|
||||
M.ui = {
|
||||
theme = "github_light",
|
||||
theme_toggle = { "kanagawa", "github_light" },
|
||||
theme = "oceanic-next",
|
||||
theme_toggle = { "oceanic-next", "oceanic-light" },
|
||||
|
||||
hl_override = highlights.override,
|
||||
hl_add = highlights.add,
|
||||
|
|
|
@ -10,7 +10,7 @@ local servers = {
|
|||
"tsserver",
|
||||
"clangd",
|
||||
"pyright",
|
||||
"rust_analyzer", -- rustaceanvim wants to do that, but the builtin thing has better integration!
|
||||
-- "rust_analyzer", -- rustaceanvim wants to do that, but the builtin thing has better integration!
|
||||
"bashls",
|
||||
"cmake",
|
||||
}
|
||||
|
@ -21,3 +21,28 @@ for _, lsp in ipairs(servers) do
|
|||
capabilities = capabilities,
|
||||
}
|
||||
end
|
||||
|
||||
lspconfig.rust_analyzer.setup {
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
check = {
|
||||
command = "clippy",
|
||||
},
|
||||
imports = {
|
||||
granularity = {
|
||||
group = "module",
|
||||
},
|
||||
prefix = "self",
|
||||
},
|
||||
cargo = {
|
||||
buildScripts = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
procMacro = {
|
||||
enable = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -102,7 +102,12 @@ local plugins = {
|
|||
["<leader>f"] = { name = "+formatting" },
|
||||
},
|
||||
},
|
||||
{ "echasnovski/mini.trailspace", lazy = false, event = { "BufReadPost", "BufNewFile" }, opts = {} },
|
||||
{
|
||||
"echasnovski/mini.trailspace",
|
||||
lazy = false,
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"itchyny/vim-cursorword",
|
||||
event = "FileType",
|
||||
|
@ -650,8 +655,7 @@ local plugins = {
|
|||
local label = {}
|
||||
|
||||
for severity, icon in pairs(icons) do
|
||||
local n = #vim.diagnostic.get(props.buf,
|
||||
{ severity = vim.diagnostic.severity[string.upper(severity)] })
|
||||
local n = #vim.diagnostic.get(props.buf, { severity = vim.diagnostic.severity[string.upper(severity)] })
|
||||
if n > 0 then
|
||||
table.insert(label, { icon .. " " .. n .. " ", group = "DiagnosticSign" .. severity })
|
||||
end
|
||||
|
@ -765,7 +769,7 @@ local plugins = {
|
|||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
||||
end,
|
||||
args = function()
|
||||
return require('custom.utils').tokenize_args(vim.fn.input("args: "))
|
||||
return require("custom.utils").tokenize_args(vim.fn.input "args: ")
|
||||
end,
|
||||
cwd = "${workspaceFolder}",
|
||||
-- FIXME: perhaps we can put the stdio somewhere more practical
|
||||
|
@ -808,8 +812,11 @@ local plugins = {
|
|||
config = function()
|
||||
local dap = require "dap"
|
||||
vim.g.rustaceanvim = {
|
||||
enable_clippy = true,
|
||||
-- Plugin configuration
|
||||
tools = {},
|
||||
tools = {
|
||||
enable_clippy = true,
|
||||
},
|
||||
-- LSP configuration
|
||||
server = {
|
||||
auto_attach = false,
|
||||
|
|
Loading…
Reference in New Issue