Added Godot lsp
This commit is contained in:
parent
9de13c05de
commit
69588b2d73
|
@ -5,3 +5,14 @@ dap.adapters.godot = {
|
||||||
host = "127.0.0.1",
|
host = "127.0.0.1",
|
||||||
port = 6006,
|
port = 6006,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dap.configurations.gdscript = {
|
||||||
|
{
|
||||||
|
type = "godot",
|
||||||
|
request = "launch",
|
||||||
|
name = "Launch scene",
|
||||||
|
project = "${workspaceFolder}",
|
||||||
|
launch_scene = true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
local lsp = require("lsp-zero")
|
local lsp = require("lsp-zero")
|
||||||
|
|
||||||
|
|
||||||
local cmp = require('cmp')
|
local cmp = require('cmp')
|
||||||
local cmp_select = {behavior = cmp.SelectBehavior.Select}
|
local cmp_select = {behavior = cmp.SelectBehavior.Select}
|
||||||
local cmp_mappings = lsp.defaults.cmp_mappings({
|
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>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>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", "<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)
|
end)
|
||||||
|
|
||||||
|
require'lspconfig'.gdscript.setup{}
|
||||||
|
|
||||||
|
|
||||||
require('mason').setup({})
|
require('mason').setup({})
|
||||||
require('mason-lspconfig').setup({
|
require('mason-lspconfig').setup({
|
||||||
ensure_installed = {'tsserver', 'eslint', 'rust_analyzer', 'gopls'},
|
ensure_installed = {'tsserver', 'eslint', 'rust_analyzer', 'gopls'},
|
||||||
|
|
Loading…
Reference in New Issue