Added Godot lsp

This commit is contained in:
nefrace 2023-11-21 18:42:34 +03:00
parent 9de13c05de
commit 69588b2d73
2 changed files with 15 additions and 2 deletions

View File

@ -5,3 +5,14 @@ dap.adapters.godot = {
host = "127.0.0.1",
port = 6006,
}
dap.configurations.gdscript = {
{
type = "godot",
request = "launch",
name = "Launch scene",
project = "${workspaceFolder}",
launch_scene = true,
}
}

View File

@ -1,6 +1,5 @@
local lsp = require("lsp-zero")
local cmp = require('cmp')
local cmp_select = {behavior = cmp.SelectBehavior.Select}
local cmp_mappings = lsp.defaults.cmp_mappings({
@ -32,10 +31,13 @@ lsp.on_attach(function(client, bufnr)
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
vim.keymap.set("n", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
end)
require'lspconfig'.gdscript.setup{}
require('mason').setup({})
require('mason-lspconfig').setup({
ensure_installed = {'tsserver', 'eslint', 'rust_analyzer', 'gopls'},