From 75e52b850b386a046f8ead78a34ec4df7cc4b1bf Mon Sep 17 00:00:00 2001 From: S4NKALP Date: Fri, 8 Mar 2024 11:27:52 +0545 Subject: [PATCH] remove(nvim): lsp rust extra code removed because of recent change in the lazyvim extra --- config/nvim/lazy-lock.json | 33 +++---- config/nvim/lazyvim.json | 3 +- config/nvim/lua/config/lazy.lua | 2 +- .../extras/editor/outline-extended.lua | 16 ++++ .../lua/plugins/extras/editor/outline.lua | 34 ------- .../{ansible.lua => ansible-extended.lua} | 8 +- .../nvim/lua/plugins/extras/lang/haskell.lua | 82 +---------------- .../lua/plugins/extras/lang/java-extended.lua | 89 ------------------- .../extras/lang/omnisharp-extended.lua | 39 +------- .../lua/plugins/extras/lang/rust-extended.lua | 76 ---------------- .../lua/plugins/extras/linting/selene.lua | 26 ++++++ .../nvim/lua/plugins/extras/util/lazyrc.lua | 39 -------- config/nvim/lua/plugins/lspconfig.lua | 3 + 13 files changed, 69 insertions(+), 381 deletions(-) create mode 100644 config/nvim/lua/plugins/extras/editor/outline-extended.lua delete mode 100644 config/nvim/lua/plugins/extras/editor/outline.lua rename config/nvim/lua/plugins/extras/lang/{ansible.lua => ansible-extended.lua} (87%) delete mode 100644 config/nvim/lua/plugins/extras/lang/java-extended.lua create mode 100644 config/nvim/lua/plugins/extras/linting/selene.lua delete mode 100644 config/nvim/lua/plugins/extras/util/lazyrc.lua diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json index 667562c1..04793082 100644 --- a/config/nvim/lazy-lock.json +++ b/config/nvim/lazy-lock.json @@ -1,11 +1,11 @@ { - "LazyVim": { "branch": "main", "commit": "fe72424e77cb9c953084bbcaaa0eb7fe8056dc70" }, + "LazyVim": { "branch": "main", "commit": "c0ad2209b67f125a1f1a1ae3ccd6e89b7ffc8946" }, "LuaSnip": { "branch": "master", "commit": "a7a4b4682c4b3e2ba82b82a4e6e5f5a0e79dec32" }, - "SchemaStore.nvim": { "branch": "main", "commit": "88355559bb42cc8e4f6ca7b624dc4c3b654c5c08" }, + "SchemaStore.nvim": { "branch": "main", "commit": "5d7f8c3e7ae4e3fa5daedb83306406f95257201c" }, "actions-preview.nvim": { "branch": "master", "commit": "5c240e6356156b72cfbf7c05feefadae61d7a06f" }, "autolist.nvim": { "branch": "main", "commit": "5f70a5f99e96c8fe3069de042abd2a8ed2deb855" }, "bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" }, - "bufferline.nvim": { "branch": "main", "commit": "615aeb04ae73d827e2cc0c35fa5ba15f2b77f4bb" }, + "bufferline.nvim": { "branch": "main", "commit": "64e2c5def50dfd6b6f14d96a45fa3d815a4a1eef" }, "catppuccin": { "branch": "main", "commit": "045e3499d9ec8d84635fb08877ae44fd33f6a38d" }, "ccc.nvim": { "branch": "main", "commit": "2ef48b4c2f19c9516ff9c76c1410d32bcc83ca70" }, "cinnamon.nvim": { "branch": "master", "commit": "c406ffda3a0302f32c23b24ab756ea20467d6578" }, @@ -13,18 +13,19 @@ "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "codeium.vim": { "branch": "main", "commit": "f2d90dedb45e35f7563d2ce3a31c6928f79de678" }, - "compiler.nvim": { "branch": "main", "commit": "fa69804f6eb4911eb62d8423a87323762d610448" }, - "conform.nvim": { "branch": "master", "commit": "34b81e70da83e26c048290204de44268eb59814e" }, + "codeium.vim": { "branch": "main", "commit": "c6728c9ebef67f97c252d9754f1466a74ef7551e" }, + "compiler.nvim": { "branch": "main", "commit": "f8ceb89b0b1dcd6d470aedd5b8c4b66545da068d" }, + "conform.nvim": { "branch": "master", "commit": "5a15cc46e75cad804fd51ec5af9227aeb1d1bdaa" }, + "crates.nvim": { "branch": "main", "commit": "ec2b04a380c9f3a8e6ca38c230e4990d71978143" }, "dashboard-nvim": { "branch": "master", "commit": "413442b12d85315fc626c44a0ce4929b213ef604" }, "dial.nvim": { "branch": "master", "commit": "27eb570085db2ef44bff4f620d3806039184651c" }, "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" }, - "dooku.nvim": { "branch": "main", "commit": "442dab144b2c5612c12d49ecf31e0013cfc681ac" }, + "dooku.nvim": { "branch": "main", "commit": "65777027f612b6f46417ae6224204174a0f270ec" }, "dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" }, "edgy.nvim": { "branch": "main", "commit": "0b35dc6da4cae6cc2f724bc610eadf955cd2319b" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, "friendly-snippets": { "branch": "main", "commit": "dcd4a586439a1c81357d5b9d26319ae218cc9479" }, - "garbage-day.nvim": { "branch": "main", "commit": "957499b8a493974bd7002b68b1f15f7d285e0dd1" }, + "garbage-day.nvim": { "branch": "main", "commit": "01a43b77459bc06038045afade8f003f08a3d02f" }, "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, "glance.nvim": { "branch": "master", "commit": "8ed5cf3b3b1231ea696d88c9efd977027429d869" }, "harpoon": { "branch": "harpoon2", "commit": "a38be6e0dd4c6db66997deab71fc4453ace97f9c" }, @@ -33,7 +34,7 @@ "icon-picker.nvim": { "branch": "master", "commit": "3ee9a0ea9feeef08ae35e40c8be6a2fa2c20f2d3" }, "indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" }, "kitty-scrollback.nvim": { "branch": "main", "commit": "93b4286c4e2c9d4a73ccbefb3adbc688d3ed5fe4" }, - "lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" }, + "lazy.nvim": { "branch": "main", "commit": "83493db50a434a4c5c648faf41e2ead80f96e478" }, "live-server.nvim": { "branch": "main", "commit": "f6f00a3f541251f0320910bb0d03c4ae14ee6d10" }, "lsp-lens.nvim": { "branch": "main", "commit": "48bb1a7e271424c15f3d588d54adc9b7c319d977" }, "lualine.nvim": { "branch": "master", "commit": "8b56462bfb746760465264de41b4907310f113ec" }, @@ -49,7 +50,7 @@ "mini.surround": { "branch": "main", "commit": "a1b590cc3b676512de507328d6bbab5e43794720" }, "multicursors.nvim": { "branch": "main", "commit": "8b3e14682eed06a532b155c7eae33e174846b3fd" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "459c60317cc1d251f6eb3b6f010d015d5d24b806" }, - "neoconf.nvim": { "branch": "main", "commit": "eb8ca458b57386b8c07e8086c59d16467177b01f" }, + "neoconf.nvim": { "branch": "main", "commit": "db1d1bd45f4e91da6abc898281711fa47eda0ece" }, "neodev.nvim": { "branch": "main", "commit": "84e0290f5600e8b89c0dfcafc864f45496a53400" }, "neogen": { "branch": "main", "commit": "b95347a588401a755eadd17482edc1662876bd58" }, "noice.nvim": { "branch": "main", "commit": "bf67d70bd7265d075191e7812d8eb42b9791f737" }, @@ -61,12 +62,12 @@ "nvim-devdocs": { "branch": "master", "commit": "521d24661ffe6d1ba025debea2675c765a9c1ee1" }, "nvim-lint": { "branch": "master", "commit": "e824adb9bc01647f71e55457353a68f0f37f9931" }, "nvim-lsp-file-operations": { "branch": "master", "commit": "223aca86b737dc66e9c51ebcda8788a8d9cc6cf2" }, - "nvim-lspconfig": { "branch": "master", "commit": "e5e600232188ed9fb960f5df6bb06084ae8bf3ec" }, + "nvim-lspconfig": { "branch": "master", "commit": "e172dd599cff2ae5267871b5e33fb42934c4df43" }, "nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" }, "nvim-puppeteer": { "branch": "main", "commit": "d72c7045683c0960e9ae6ae9628d0907b2cab9f3" }, "nvim-recorder": { "branch": "main", "commit": "df9044801b9b59b740b89fd64ed23038dd293e91" }, "nvim-spectre": { "branch": "master", "commit": "3712ff0cdf4f9f877d9ca708d835a877d9a0abaf" }, - "nvim-treesitter": { "branch": "master", "commit": "c09932bd2de01dc9c01e870fe83060693c67de13" }, + "nvim-treesitter": { "branch": "master", "commit": "9775d5d7c724f81acdd441e7e9edefc4514e990b" }, "nvim-treesitter-context": { "branch": "master", "commit": "b8b7e52c1517d401d7c519787d5dc4528c41291a" }, "nvim-treesitter-endwise": { "branch": "master", "commit": "60e8c288e011403f248b5f6478dde12bed8a6c55" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "b7a0bfa3e93697ca5b61b15df633404bf8f45883" }, @@ -75,15 +76,16 @@ "nvim-various-textobjs": { "branch": "main", "commit": "3782eb41a964f45788843e34f325a470f0dc6757" }, "nvim-web-devicons": { "branch": "master", "commit": "4adea17610d140a99c313e3f79a9dc01825d59ae" }, "nvim_context_vt": { "branch": "master", "commit": "8f7b6b46292e0819290b0d368abc3366b8a163fc" }, - "obsidian.nvim": { "branch": "main", "commit": "2814bd2f53b5e77f7db1f136c027bc4e9bffa0ec" }, + "obsidian.nvim": { "branch": "main", "commit": "51bc68824044f96165b670db2d5bad30b354f188" }, "outline.nvim": { "branch": "main", "commit": "a8d40aecb799196303ff3521c0e31c87bba57198" }, - "overseer.nvim": { "branch": "master", "commit": "4855aefcf335bbac71eea9c6a888958fb1ed1e1a" }, + "overseer.nvim": { "branch": "master", "commit": "b72f6d23ce47ccd427be2341f389c63448278f17" }, "package-info.nvim": { "branch": "master", "commit": "45acce5b12ce824332d8000cc2c91805b6710446" }, "persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" }, "persistent-breakpoints.nvim": { "branch": "main", "commit": "01e43512ef8d137f2b9e5c1c74fd35c37e787b59" }, "plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "cfc3f53cfa0fbabd95bd33747288aea24fe45211" }, "refactoring.nvim": { "branch": "master", "commit": "93d69cce9f0cbee8afae5b2380b296323792645f" }, + "rustaceanvim": { "branch": "master", "commit": "387ca846d632f8c90631536341ca1778b4c2c497" }, "search-replace.nvim": { "branch": "main", "commit": "d92290a02d97f4e9b8cd60d28b56b403432158d5" }, "semshi": { "branch": "master", "commit": "0182447e2ff4dfa04cd2dfe5f189e012c581ca45" }, "smart-splits.nvim": { "branch": "master", "commit": "1ae8794e9e7fbdf0ec4074f2d0e056556a834f75" }, @@ -91,13 +93,12 @@ "suda.vim": { "branch": "master", "commit": "8b0fc3711760195aba104e2d190cff9af8267052" }, "telescope-floaterm.nvim": { "branch": "main", "commit": "ccd3f40ae30dce5de0e5d0f5069e08e7d9ad6d23" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, - "telescope-lazy.nvim": { "branch": "main", "commit": "62d1c137c5afc4783ebc25468deff7774a3525ae" }, + "telescope-lazy.nvim": { "branch": "main", "commit": "3487d6212fe1b5750ae239e2207f4cb603004d36" }, "telescope-undo.nvim": { "branch": "main", "commit": "d3afc1c105535a90caec092ce27a113f77ba7b84" }, "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" }, "telescope.nvim": { "branch": "master", "commit": "dc1ea28cc2a02cd1cebb9d80e967807d668f78f8" }, "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" }, "tokyonight.nvim": { "branch": "main", "commit": "610179f7f12db3d08540b6cc61434db2eaecbcff" }, - "tree-sitter-hyprlang": { "branch": "master", "commit": "fc1d331586e4da2b5f5bcfa89d630ebafe66458b" }, "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, "ts-error-translator.nvim": { "branch": "main", "commit": "1d24a38427fd2030c5f4e82156c87ab7d6d44814" }, "ts-node-action": { "branch": "master", "commit": "e37eb458378de5d994df459a53711b2546abef0f" }, diff --git a/config/nvim/lazyvim.json b/config/nvim/lazyvim.json index 8c493dc7..c72160d2 100644 --- a/config/nvim/lazyvim.json +++ b/config/nvim/lazyvim.json @@ -24,7 +24,7 @@ "plugins.extras.editor.git.diffview", "plugins.extras.editor.harpoon", "plugins.extras.editor.live-server", - "plugins.extras.editor.outline", + "plugins.extras.editor.outline-extended", "plugins.extras.editor.package-info", "plugins.extras.editor.search-replace", "plugins.extras.editor.suda", @@ -37,6 +37,7 @@ "plugins.extras.formatting.trim_whitespace", "plugins.extras.lang.bash", "plugins.extras.lang.markdown-extended", + "plugins.extras.lang.rust-extended", "plugins.extras.lang.web.html-css", "plugins.extras.lang.web.typescript-extended", "plugins.extras.lang.web.vue", diff --git a/config/nvim/lua/config/lazy.lua b/config/nvim/lua/config/lazy.lua index 3a20e1a1..a10b6b7d 100644 --- a/config/nvim/lua/config/lazy.lua +++ b/config/nvim/lua/config/lazy.lua @@ -12,7 +12,7 @@ require("lazy").setup({ -- add LazyVim and import its plugins { "LazyVim/LazyVim", import = "lazyvim.plugins" }, { import = "plugins" }, - { import = "plugins.extras.util.lazyrc" }, + { import = "lazyvim.plugins.extras.lazyrc" }, }, defaults = { -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. diff --git a/config/nvim/lua/plugins/extras/editor/outline-extended.lua b/config/nvim/lua/plugins/extras/editor/outline-extended.lua new file mode 100644 index 00000000..9d55ac1a --- /dev/null +++ b/config/nvim/lua/plugins/extras/editor/outline-extended.lua @@ -0,0 +1,16 @@ +return { + { import = "lazyvim.plugins.extras.editor.outline" }, + { + "hedyhli/outline.nvim", + opts = { + outline_window = { + show_symbol_lineno = true, + auto_jump = true, + jump_highlight_duration = 150, + }, + symbol_folding = { + autofold_depth = 1, + }, + }, + }, +} diff --git a/config/nvim/lua/plugins/extras/editor/outline.lua b/config/nvim/lua/plugins/extras/editor/outline.lua deleted file mode 100644 index 37515b72..00000000 --- a/config/nvim/lua/plugins/extras/editor/outline.lua +++ /dev/null @@ -1,34 +0,0 @@ -return { - { - "hedyhli/outline.nvim", - cmd = { "Outline", "OutlineOpen" }, - keys = { { "cs", "Outline", desc = "Symbols Outline" } }, - opts = { - outline_window = { - show_symbol_lineno = true, - auto_jump = true, - jump_highlight_duration = 150, - }, - symbol_folding = { - autofold_depth = 1, - }, - symbols = { - filter = require("lazyvim.config").kind_filter, - }, - }, - }, - { - "folke/edgy.nvim", - optional = true, - opts = function(_, opts) - opts.right = opts.right or {} - table.insert(opts.right, { - title = "Symbols Outline", - ft = "Outline", - pinned = true, - open = "OutlineOpen", - size = { width = 0.15 }, - }) - end, - }, -} diff --git a/config/nvim/lua/plugins/extras/lang/ansible.lua b/config/nvim/lua/plugins/extras/lang/ansible-extended.lua similarity index 87% rename from config/nvim/lua/plugins/extras/lang/ansible.lua rename to config/nvim/lua/plugins/extras/lang/ansible-extended.lua index 4af5c4cc..9bbc2cf2 100644 --- a/config/nvim/lua/plugins/extras/lang/ansible.lua +++ b/config/nvim/lua/plugins/extras/lang/ansible-extended.lua @@ -1,10 +1,11 @@ return { { import = "lazyvim.plugins.extras.lang.yaml" }, + { import = "lazyvim.plugins.extras.lang.ansible" }, { "williamboman/mason.nvim", opts = function(_, opts) opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "ansible-lint", "ansible-language-server" }) + vim.list_extend(opts.ensure_installed, { "ansible-language-server" }) end, }, { @@ -21,11 +22,6 @@ return { }, }) end, - opts = { - servers = { - ansiblels = {}, - }, - }, }, { "mfussenegger/nvim-lint", diff --git a/config/nvim/lua/plugins/extras/lang/haskell.lua b/config/nvim/lua/plugins/extras/lang/haskell.lua index 3b21c6a1..9945006e 100644 --- a/config/nvim/lua/plugins/extras/lang/haskell.lua +++ b/config/nvim/lua/plugins/extras/lang/haskell.lua @@ -1,85 +1,5 @@ return { - { - "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "haskell" }) - end - end, - }, - { - "mrcjkb/haskell-tools.nvim", - version = "^3", - ft = { "haskell", "lhaskell", "cabal", "cabalproject" }, - dependencies = { - { "nvim-telescope/telescope.nvim", optional = true }, - }, - config = function() - require("lazyvim.util").on_load("telescope.nvim", function() - require("telescope").load_extension("ht") - end) - end, - }, - { - "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "haskell-language-server" }) - end, - }, - { - "mfussenegger/nvim-dap", - optional = true, - dependencies = { - { - "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "haskell-debug-adapter" }) - end, - }, - }, - }, - { - "nvim-neotest/neotest", - optional = true, - dependencies = { "mrcjkb/neotest-haskell" }, - opts = { - adapters = { - ["neotest-haskell"] = {}, - }, - }, - }, - { - "mrcjkb/haskell-snippets.nvim", - dependencies = { "L3MON4D3/LuaSnip" }, - config = function() - local haskell_snippets = require("haskell-snippets").all - require("luasnip").add_snippets("haskell", haskell_snippets, { key = "haskell" }) - end, - }, - { - "luc-tielen/telescope_hoogle", - ft = { "haskell", "lhaskell", "cabal", "cabalproject" }, - dependencies = { "nvim-telescope/telescope.nvim" }, - config = function() - require("lazyvim.util").on_load("telescope.nvim", function() - require("telescope").load_extension("hoogle") - end) - end, - }, - -- Make sure lspconfig doesn't start hls, - -- as it conflicts with haskell-tools - { - "neovim/nvim-lspconfig", - opts = { - setup = { - hls = function() - return true - end, - }, - }, - }, + { import = "lazyvim.plugins.extras.lang.haskell" }, { "luckasRanarison/nvim-devdocs", optional = true, diff --git a/config/nvim/lua/plugins/extras/lang/java-extended.lua b/config/nvim/lua/plugins/extras/lang/java-extended.lua deleted file mode 100644 index 978deda2..00000000 --- a/config/nvim/lua/plugins/extras/lang/java-extended.lua +++ /dev/null @@ -1,89 +0,0 @@ -local Util = require("lazyvim.util") - -return { - { - "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "java" }) - end, - }, - { - "mfussenegger/nvim-dap", - optional = true, - dependencies = { - { - "williamboman/mason.nvim", - opts = function(_, opts) - opts.registries = opts.registries or {} - table.insert(opts.registries, 1, "github:nvim-java/mason-registry") - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "java-test", "java-debug-adapter" }) - end, - }, - }, - }, - { - "nvim-java/nvim-java", - lazy = true, - ft = "java", - dependencies = { - { "nvim-java/lua-async-await" }, - { "nvim-java/nvim-java-core" }, - { "nvim-java/nvim-java-test" }, - { "nvim-java/nvim-java-dap" }, - { - "neovim/nvim-lspconfig", - opts = { - servers = { - jdtls = { - keys = { - -- Workaround for the lack of a DAP strategy in neotest-java - { - "td", - function() - require("java").dap.config_dap() - require("java").test.debug_current_method() - end, - desc = "Debug Nearest (Java)", - }, - }, - }, - }, - }, - }, - { - "williamboman/mason-lspconfig.nvim", - opts = { - handlers = { - ["jdtls"] = function() - require("java").setup({ - java_test = { - enable = Util.has("nvim-dap"), - }, - java_debug_adapter = { - enable = Util.has("nvim-dap"), - }, - jdk = { - auto_install = false, - }, - }) - end, - }, - }, - }, - }, - }, - { - "nvim-neotest/neotest", - optional = true, - dependencies = { - "rcasia/neotest-java", - }, - opts = { - adapters = { - ["neotest-java"] = {}, - }, - }, - }, -} diff --git a/config/nvim/lua/plugins/extras/lang/omnisharp-extended.lua b/config/nvim/lua/plugins/extras/lang/omnisharp-extended.lua index 1c895a59..23a3e9a1 100644 --- a/config/nvim/lua/plugins/extras/lang/omnisharp-extended.lua +++ b/config/nvim/lua/plugins/extras/lang/omnisharp-extended.lua @@ -1,45 +1,8 @@ return { { import = "lazyvim.plugins.extras.lang.omnisharp" }, - { - "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "netcoredbg" }) - end, - }, - { - "mfussenegger/nvim-dap", - optional = true, - opts = function() - local dap = require("dap") - if not dap.adapters["netcoredbg"] then - require("dap").adapters["netcoredbg"] = { - type = "executable", - command = vim.fn.exepath("netcoredbg"), - args = { "--interpreter=vscode" }, - } - end - for _, lang in ipairs({ "cs", "fsharp", "vb" }) do - if not dap.configurations[lang] then - dap.configurations[lang] = { - { - type = "netcoredbg", - name = "Launch file", - request = "launch", - ---@diagnostic disable-next-line: redundant-parameter - program = function() - return vim.fn.input("Path to dll: ", vim.fn.getcwd() .. "/", "file") - end, - cwd = "${workspaceFolder}", - }, - } - end - end - end, - }, { "nvim-neotest/neotest", - optiona = true, + optional = true, dependencies = { "Issafalcon/neotest-dotnet", }, diff --git a/config/nvim/lua/plugins/extras/lang/rust-extended.lua b/config/nvim/lua/plugins/extras/lang/rust-extended.lua index 19cead6e..f1c2bd5a 100644 --- a/config/nvim/lua/plugins/extras/lang/rust-extended.lua +++ b/config/nvim/lua/plugins/extras/lang/rust-extended.lua @@ -1,81 +1,5 @@ return { { import = "lazyvim.plugins.extras.lang.rust" }, - { - "simrat39/rust-tools.nvim", - enabled = false, - }, - { - "mrcjkb/rustaceanvim", - version = "^4", -- Recommended - ft = { "rust" }, - opts = { - server = { - on_attach = function(client, bufnr) - -- register which-key mappings - local wk = require("which-key") - -- stylua: ignore - wk.register({ - ["cR"] = { function() vim.cmd.RustLsp("codeAction") end, "Code Action" }, - ["dr"] = { function() vim.cmd.RustLsp("debuggables") end, "Rust debuggables" }, - }, { mode = "n", buffer = bufnr }) - end, - default_settings = { - -- rust-analyzer language server configuration - ["rust-analyzer"] = { - cargo = { - allFeatures = true, - loadOutDirsFromCheck = true, - runBuildScripts = true, - }, - -- Add clippy lints for Rust. - checkOnSave = { - allFeatures = true, - command = "clippy", - extraArgs = { "--no-deps" }, - }, - procMacro = { - enable = true, - ignored = { - ["async-trait"] = { "async_trait" }, - ["napi-derive"] = { "napi" }, - ["async-recursion"] = { "async_recursion" }, - }, - }, - }, - }, - }, - }, - config = function(_, opts) - vim.g.rustaceanvim = vim.tbl_deep_extend("force", {}, opts or {}) - end, - }, - { - "nvim-neotest/neotest", - optional = true, - dependencies = { - "rouge8/neotest-rust", - enabled = false, - }, - opts = function(_, opts) - opts.adapters = opts.adapters or {} - vim.list_extend(opts.adapters, { - require("rustaceanvim.neotest"), - }) - end, - }, - { - "neovim/nvim-lspconfig", - opts = { - servers = { - rust_analyzer = {}, - }, - setup = { - rust_analyzer = function() - return true - end, - }, - }, - }, { "stevearc/conform.nvim", opts = function(_, opts) diff --git a/config/nvim/lua/plugins/extras/linting/selene.lua b/config/nvim/lua/plugins/extras/linting/selene.lua new file mode 100644 index 00000000..c2dde11f --- /dev/null +++ b/config/nvim/lua/plugins/extras/linting/selene.lua @@ -0,0 +1,26 @@ +return { + { + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "selene" }) + end, + }, + { + "mfussenegger/nvim-lint", + opts = function(_, opts) + opts.linters_by_ft.lua = opts.linters_by_ft.lua or {} + table.insert(opts.linters_by_ft.lua, "selene") + + opts.linters = { + selene = { + condition = function(ctx) + return vim.fs.find({ "selene.toml" }, { path = ctx.filename, upward = true })[1] + end, + }, + } + + return opts + end, + }, +} diff --git a/config/nvim/lua/plugins/extras/util/lazyrc.lua b/config/nvim/lua/plugins/extras/util/lazyrc.lua deleted file mode 100644 index 4ae88441..00000000 --- a/config/nvim/lua/plugins/extras/util/lazyrc.lua +++ /dev/null @@ -1,39 +0,0 @@ ---[[ -Enable project-specific plugin specs. - -File .lazy.lua: - is read when present in the current working directory - should return a plugin spec - has to be manually trusted for each instance of the file - -This extra should be the last plugin spec added to lazy.nvim - -See: - :h 'exrc' - :h :trust ---]] -local filepath = vim.fn.fnamemodify(".lazy.lua", ":p") -local file = vim.secure.read(filepath) -if not file then - return {} -end - -vim.api.nvim_create_autocmd("User", { - pattern = "VeryLazy", - once = true, - callback = function() - local Config = require("lazy.core.config") - local Util = require("lazyvim.util") - local lazyrc_idx = Util.plugin.extra_idx("lazyrc") - - if lazyrc_idx and lazyrc_idx ~= #Config.spec.modules then - Util.warn({ - "The `lazyrc` extra must be the last plugin spec added to **lazy.nvim**. ", - "", - "Add `{ import = 'lazyvim.plugins.extras.lazyrc' }` to file `config.lazy`. ", - "Do not use the `LazyExtras` command. ", - }, { title = "LazyVim", once = true }) - end - end, -}) -return loadstring(file)() diff --git a/config/nvim/lua/plugins/lspconfig.lua b/config/nvim/lua/plugins/lspconfig.lua index faebe20d..12bda8fe 100644 --- a/config/nvim/lua/plugins/lspconfig.lua +++ b/config/nvim/lua/plugins/lspconfig.lua @@ -40,6 +40,9 @@ return { inlay_hints = { enabled = nvim_0_10, }, + codelens = { + enabled = nvim_0_10, + }, servers = { lua_ls = { settings = {