fix: Rust formatter
This commit is contained in:
parent
a78598a2a1
commit
d9fa7807db
7 changed files with 52 additions and 59 deletions
|
|
@ -14,6 +14,11 @@ vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
|||
require("lazy").setup({
|
||||
spec = {
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
{ import = "lazyvim.plugins.extras.ui.alpha" },
|
||||
{ import = "lazyvim.plugins.extras.ui.edgy" },
|
||||
{ import = "plugins" },
|
||||
{ import = "plugins.plugins" },
|
||||
{ import = "lazyvim.plugins.extras.lang.tailwind" },
|
||||
{ import = "lazyvim.plugins.extras.lang.rust" },
|
||||
{ import = "lazyvim.plugins.extras.lang.java" },
|
||||
{ import = "lazyvim.plugins.extras.lang.go" },
|
||||
|
|
@ -23,16 +28,11 @@ require("lazy").setup({
|
|||
{ import = "lazyvim.plugins.extras.lang.markdown" },
|
||||
{ import = "lazyvim.plugins.extras.lang.cmake" },
|
||||
{ import = "lazyvim.plugins.extras.lang.omnisharp" },
|
||||
{ import = "lazyvim.plugins.extras.lang.tailwind" },
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
{ import = "lazyvim.plugins.extras.lang.tex" },
|
||||
{ import = "lazyvim.plugins.extras.util.dot" },
|
||||
{ import = "lazyvim.plugins.extras.ui.alpha" },
|
||||
{ import = "lazyvim.plugins.extras.dap.core" },
|
||||
{ import = "lazyvim.plugins.extras.test.core" },
|
||||
{ import = "lazyvim.plugins.extras.ui.edgy" },
|
||||
{ import = "plugins" },
|
||||
{ import = "plugins.plugins" },
|
||||
},
|
||||
defaults = {
|
||||
lazy = true,
|
||||
|
|
|
|||
|
|
@ -3,26 +3,13 @@ return {
|
|||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
diagnostics = {
|
||||
underline = true,
|
||||
update_in_insert = false,
|
||||
virtual_text = { spacing = 4, source = "if_many", prefix = "●" },
|
||||
severity_sort = true,
|
||||
},
|
||||
-- inlay_hints = {
|
||||
-- enabled = true,
|
||||
-- },
|
||||
capabilities = {},
|
||||
format_notify = false,
|
||||
format = {
|
||||
formatting_options = nil,
|
||||
timeout_ms = nil,
|
||||
},
|
||||
-- LSP Server Settings
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
cssls = {},
|
||||
html = {},
|
||||
bashls = {},
|
||||
ansiblels = {},
|
||||
asm_lsp = {},
|
||||
|
|
@ -83,16 +70,21 @@ return {
|
|||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
opts = function()
|
||||
local opts = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
fish = { "fish_indent" },
|
||||
sh = { "shfmt" },
|
||||
typst = { "typstfmt" },
|
||||
opts = {
|
||||
keys = {
|
||||
{
|
||||
-- Customize or remove this keymap to your liking
|
||||
"<leader>cF",
|
||||
function()
|
||||
require("conform").format({ async = true, lsp_fallback = true })
|
||||
end,
|
||||
mode = "",
|
||||
desc = "Format buffer",
|
||||
},
|
||||
}
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
formatters_by_ft = {
|
||||
typst = { "typstfmt" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue