remove(nvim): lsp rust extra code removed because of recent change in the lazyvim extra
This commit is contained in:
1 parent
f28cc5a7ec
commit
75e52b850b
13 files changed
+69
-381
No files matched your search
@@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"hedyhli/outline.nvim",
|
||||
cmd = { "Outline", "OutlineOpen" },
|
||||
keys = { { "<leader>cs", "<cmd>Outline<CR>", 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,
|
||||
},
|
||||
}
|
||||
+2
-6
@@ -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",
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
{
|
||||
"<leader>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"] = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -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",
|
||||
},
|
||||
|
||||
@@ -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({
|
||||
["<leader>cR"] = { function() vim.cmd.RustLsp("codeAction") end, "Code Action" },
|
||||
["<leader>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)
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
}
|
||||
@@ -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)()
|
||||
@@ -40,6 +40,9 @@ return {
|
||||
inlay_hints = {
|
||||
enabled = nvim_0_10,
|
||||
},
|
||||
codelens = {
|
||||
enabled = nvim_0_10,
|
||||
},
|
||||
servers = {
|
||||
lua_ls = {
|
||||
settings = {
|
||||
|
||||
Reference in new issue
Block a user