parent
345b80d5a0
commit
b318785502
2 changed files with 338 additions and 390 deletions
|
@ -231,5 +231,3 @@ for server_name, server in pairs(servers) do
|
||||||
end
|
end
|
||||||
|
|
||||||
lspconfig.gdscript.setup {}
|
lspconfig.gdscript.setup {}
|
||||||
|
|
||||||
return servers
|
|
||||||
|
|
|
@ -17,37 +17,6 @@ return {
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require 'custom.plugins.configs.lsp'
|
require 'custom.plugins.configs.lsp'
|
||||||
|
|
||||||
-- so much effort yet it does nothing
|
|
||||||
vim.api.nvim_create_user_command("RustSetTarget", function(cmdargs)
|
|
||||||
print("WARN: this apperently does nothing")
|
|
||||||
vim.cmd [[
|
|
||||||
function! Rust_complete_targets(...)
|
|
||||||
return ["x86_64-unknown-linux-gnu", "thumbv6m-none-eabi"]
|
|
||||||
endfunction
|
|
||||||
]]
|
|
||||||
local target = vim.fn.input({
|
|
||||||
default = "x86_64-unknown-linux-gnu",
|
|
||||||
completion = "customlist,Rust_complete_targets"
|
|
||||||
})
|
|
||||||
print("setting target to", target)
|
|
||||||
for _, client in ipairs(vim.lsp.get_clients({ name = "rust_analyzer" })) do
|
|
||||||
print("notify rust_analyzer")
|
|
||||||
local status = client.notify("workspace/didChangeConfiguration",
|
|
||||||
{
|
|
||||||
settings = {
|
|
||||||
cargo = {
|
|
||||||
target = target
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
print("status: ", status)
|
|
||||||
end
|
|
||||||
end, {
|
|
||||||
nargs = 0,
|
|
||||||
desc = "Set target for rust analyzer lsp"
|
|
||||||
})
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
-- See `:help gitsigns` to understand what the configuration keys do
|
-- See `:help gitsigns` to understand what the configuration keys do
|
||||||
|
@ -387,23 +356,4 @@ return {
|
||||||
},
|
},
|
||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"klen/nvim-config-local",
|
|
||||||
config = function()
|
|
||||||
require("config-local").setup({
|
|
||||||
-- Default options (optional)
|
|
||||||
|
|
||||||
-- Config file patterns to load (lua supported)
|
|
||||||
config_files = { ".clangd.lua", ".nvim.lua", ".nvimrc", ".exrc", ".rust_analyzer.nvim" },
|
|
||||||
|
|
||||||
-- Where the plugin keeps files data
|
|
||||||
hashfile = vim.fn.stdpath("data") .. "/config-local",
|
|
||||||
|
|
||||||
autocommands_create = true, -- Create autocommands (VimEnter, DirectoryChanged)
|
|
||||||
commands_create = true, -- Create commands (ConfigLocalSource, ConfigLocalEdit, ConfigLocalTrust, ConfigLocalIgnore)
|
|
||||||
silent = false, -- Disable plugin messages (Config loaded/ignored)
|
|
||||||
lookup_parents = false, -- Lookup config files in parent directories
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue