Added GDScript stuff for connecting neovim to godot as my external editor.
This commit is contained in:
parent
89e3165cc3
commit
80c5bd709d
1 changed files with 14 additions and 0 deletions
14
ftplugin/gdscript.lua
Normal file
14
ftplugin/gdscript.lua
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
local port = os.getenv('GDScript_Port') or '6005'
|
||||||
|
local cmd = vim.lsp.rpc.connect('127.0.0.1', port)
|
||||||
|
local pipe = '/tmp/godot.pipe'
|
||||||
|
|
||||||
|
vim.print("Hello, World from gdscript")
|
||||||
|
|
||||||
|
vim.lsp.start({
|
||||||
|
name = 'Godot',
|
||||||
|
cmd = cmd,
|
||||||
|
root_dir = vim.fs.dirname(vim.fs.find({ 'project.godot', '.git' }, { upaward = true })[1]),
|
||||||
|
on_attach = function(client, bufnr)
|
||||||
|
vim.api.nvim_command('echo serverstart("' .. pipe .. '")')
|
||||||
|
end
|
||||||
|
})
|
||||||
Loading…
Add table
Add a link
Reference in a new issue