|
|
@ -536,8 +536,10 @@ require('lazy').setup {
|
|
|
|
-- pyright = {},
|
|
|
|
-- pyright = {},
|
|
|
|
rust_analyzer = {
|
|
|
|
rust_analyzer = {
|
|
|
|
settings = {
|
|
|
|
settings = {
|
|
|
|
|
|
|
|
['rust-analyzer'] = {
|
|
|
|
check = {
|
|
|
|
check = {
|
|
|
|
command = "clippy",
|
|
|
|
command = 'clippy',
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -611,8 +613,6 @@ require('lazy').setup {
|
|
|
|
|
|
|
|
|
|
|
|
{ -- Autoformat
|
|
|
|
{ -- Autoformat
|
|
|
|
'stevearc/conform.nvim',
|
|
|
|
'stevearc/conform.nvim',
|
|
|
|
event = { "BufWritePre" },
|
|
|
|
|
|
|
|
cmd = { "ConformInfo" },
|
|
|
|
|
|
|
|
opts = {
|
|
|
|
opts = {
|
|
|
|
notify_on_error = false,
|
|
|
|
notify_on_error = false,
|
|
|
|
format_on_save = {
|
|
|
|
format_on_save = {
|
|
|
@ -620,12 +620,25 @@ require('lazy').setup {
|
|
|
|
lsp_fallback = true,
|
|
|
|
lsp_fallback = true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
formatters_by_ft = {
|
|
|
|
formatters_by_ft = {
|
|
|
|
lua = { "stylua" },
|
|
|
|
lua = { 'stylua' },
|
|
|
|
python = { "isort", "black" },
|
|
|
|
python = { 'isort', 'black' },
|
|
|
|
javascript = { { "prettierd", "prettier" } },
|
|
|
|
javascript = { { 'prettierd', 'prettier' } },
|
|
|
|
typescript = { { "prettierd", "prettier" } },
|
|
|
|
typescript = { { 'prettierd', 'prettier' } },
|
|
|
|
rust = { "rustfmt" },
|
|
|
|
rust = { 'rustfmt' },
|
|
|
|
cpp = { "clang-format" },
|
|
|
|
cpp = { 'clang-format' },
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
event = { 'BufWritePre' },
|
|
|
|
|
|
|
|
cmd = { 'ConformInfo' },
|
|
|
|
|
|
|
|
keys = {
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
-- Customize or remove this keymap to your liking
|
|
|
|
|
|
|
|
'<leader>f',
|
|
|
|
|
|
|
|
function()
|
|
|
|
|
|
|
|
require('conform').format { async = true, lsp_fallback = true }
|
|
|
|
|
|
|
|
end,
|
|
|
|
|
|
|
|
mode = '',
|
|
|
|
|
|
|
|
desc = 'Format buffer',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
init = function()
|
|
|
|
init = function()
|
|
|
|