try stuff

This commit is contained in:
cscherr 2025-07-14 17:41:06 +02:00
parent 76853beccb
commit 345b80d5a0
Signed by: cscherrNT
GPG key ID: 8E2B45BC51A27EA7
2 changed files with 390 additions and 338 deletions

View file

@ -231,3 +231,5 @@ for server_name, server in pairs(servers) do
end
lspconfig.gdscript.setup {}
return servers

View file

@ -17,6 +17,37 @@ return {
},
config = function()
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,
},
-- See `:help gitsigns` to understand what the configuration keys do
@ -356,4 +387,23 @@ return {
},
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,
}
}