From b7b1127aac26d53dc161a388fcdeb2fcb9606f6e Mon Sep 17 00:00:00 2001 From: Zynh0722 Date: Thu, 14 Dec 2023 03:49:45 -0800 Subject: [PATCH] switching to lazy extras manager --- lazyvim.json | 9 +++- lua/config/lazy.lua | 12 +++--- lua/plugins/lspconfig.lua | 87 +++++++++++++++++++++----------------- lua/plugins/typescript.lua | 3 -- 4 files changed, 63 insertions(+), 48 deletions(-) delete mode 100644 lua/plugins/typescript.lua diff --git a/lazyvim.json b/lazyvim.json index f63dc38..10110eb 100644 --- a/lazyvim.json +++ b/lazyvim.json @@ -1,6 +1,13 @@ { "extras": [ - "lazyvim.plugins.extras.lang.rust" + "lazyvim.plugins.extras.dap.core", + "lazyvim.plugins.extras.editor.aerial", + "lazyvim.plugins.extras.formatting.prettier", + "lazyvim.plugins.extras.lang.java", + "lazyvim.plugins.extras.lang.rust", + "lazyvim.plugins.extras.lang.tailwind", + "lazyvim.plugins.extras.lang.typescript", + "lazyvim.plugins.extras.ui.mini-animate" ], "news": { "NEWS.md": "2123" diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index e3b802c..8efa736 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -11,15 +11,15 @@ require("lazy").setup({ -- add LazyVim and import its plugins { "LazyVim/LazyVim", import = "lazyvim.plugins" }, -- import any extras modules here - { import = "lazyvim.plugins.extras.lang.json" }, - { import = "lazyvim.plugins.extras.lang.tailwind" }, + -- { import = "lazyvim.plugins.extras.lang.json" }, + -- { import = "lazyvim.plugins.extras.lang.tailwind" }, -- { import = "lazyvim.plugins.extras.lang.clangd" }, - { import = "lazyvim.plugins.extras.lang.typescript" }, + -- { import = "lazyvim.plugins.extras.lang.typescript" }, -- { import = "lazyvim.plugins.extras.lang.rust" }, -- { import = "lazyvim.plugins.extras.formatting.prettier" }, - { import = "lazyvim.plugins.extras.editor.aerial" }, - { import = "lazyvim.plugins.extras.lang.tailwind" }, - { import = "lazyvim.plugins.extras.ui.mini-animate" }, + -- { import = "lazyvim.plugins.extras.editor.aerial" }, + -- { import = "lazyvim.plugins.extras.lang.tailwind" }, + -- { import = "lazyvim.plugins.extras.ui.mini-animate" }, -- import/override with your plugins { import = "plugins" }, }, diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index c14a1e1..7458b04 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -1,38 +1,49 @@ -return {} --- return { --- { --- "neovim/nvim-lspconfig", --- ---@class PluginLspOpts --- opts = { --- ---@type lspconfig.options --- servers = { --- -- pyright will be automatically installed with mason and loaded with lspconfig --- rust_analyzer = { --- mason = false, --- settings = { --- ["rust-analyzer"] = { --- imports = { --- granularity = { --- group = "module", --- }, --- }, --- cargo = { --- buildScripts = { --- enable = false, --- }, --- }, --- files = { --- excludeDirs = { --- "pe-template", --- }, --- }, --- procMacro = { --- enable = true, --- }, --- }, --- }, --- }, --- }, --- }, --- }, --- } +-- return {} +return { + { + "neovim/nvim-lspconfig", + ---@class PluginLspOpts + opts = { + -- -@type lspconfig.options + servers = { + -- pyright will be automatically installed with mason and loaded with lspconfig + rust_analyzer = { + mason = false, + settings = { + ["rust-analyzer"] = { + rustfmt = { + overrideCommand = { "leptosfmt", "--stdin", "--rustfmt" }, + }, + imports = { + granularity = { + group = "module", + }, + }, + cargo = { + buildScripts = { + enable = false, + }, + }, + files = { + excludeDirs = { + "pe-template", + }, + }, + procMacro = { + enable = true, + }, + }, + }, + }, + tailwindcss = { + init_options = { + userLanguages = { + rust = "html", + }, + }, + filetypes = { "rust" }, + }, + }, + }, + }, +} diff --git a/lua/plugins/typescript.lua b/lua/plugins/typescript.lua deleted file mode 100644 index f5c77bd..0000000 --- a/lua/plugins/typescript.lua +++ /dev/null @@ -1,3 +0,0 @@ -return { - { import = "lazyvim.plugins.extras.lang.typescript" }, -}