-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using with neovim's built in LSP #53
Comments
It seems that you didn't tell neovim to start a socket connection. Maybe try adding |
Sorry, can you please explain? I am a novice. I see from your vs code client that you require three things: local lspconfig = require "lspconfig"
local configs = require "lspconfig/configs"
local util = require "lspconfig/util"
if not lspconfig.lsp_wl then
configs.lsp_wl = {
default_config = {
cmd = {"wolfram", "-script", "/home/manish/lsp-wl/init.wls"},
filetypes = {"mma", "wl"},
root_dir = util.path.dirname,
-- additions
settings = {
lsp_wl = {
port = 6536,
wolframExecutablePath = "/home/manish/Software/Mathematica/Executables/wolfram",
wolframLanguageServerPath = "/home/manish/lsp-wl/init.wls"
}
}
--
}
}
end
lspconfig.lsp_wl.setup {} This is giving the same error as before. I tried to add the port value in The code above is mainly relying on |
I wonder if the socket is already supported by neovim lsp, but from this issue neovim/neovim#11911, it seems not. Godot has made a workaround using |
Thanks, it worked once but somehow now its not working. I will check and report later ! |
Thank you. I checked and have got the hover and signature help working fine. The autocomplete however is not working for now. Here's my config file: local lspconfig = require "lspconfig"
local configs = require "lspconfig/configs"
local util = require "lspconfig/util"
if not lspconfig.lsp_wl then
configs.lsp_wl = {
default_config = {
cmd = {"nc", "localhost", "6536"},
filetypes = {"mma", "wl"},
root_dir = util.path.dirname,
settings = { }
}
}
end
which I have placed in lua require'lspconfig'.lsp_wl.setup{on_attach=require'completion'.on_attach} in my In mathematica I do as you say:
to get going. For autocomplete, I use I looked at the default Expandlocal configs = require 'lspconfig/configs'
local util = require 'lspconfig/util'
local server_name = "bashls"
configs[server_name] = {
default_config = {
cmd = {"bash-language-server", "start"};
cmd_env = {
-- Prevent recursive scanning which will cause issues when opening a file
-- directly in the home directory (e.g. ~/foo.sh).
--
-- Default upstream pattern is "**/*@(.sh|.inc|.bash|.command)".
GLOB_PATTERN = vim.env.GLOB_PATTERN or "*@(.sh|.inc|.bash|.command)"
},
filetypes = {"sh"};
root_dir = util.path.dirname;
};
docs = {
description = [[
https://github.com/mads-hartmann/bash-language-server
Language server for bash, written using tree sitter in typescript.
]];
default_config = {
root_dir = "vim's starting directory";
};
};
}; |
I try your config with local enhance_attach = function(client,bufnr)
api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")
end
vim.notify("Config lsp_wl")
configs.lsp_wl = {
default_config = {
cmd = {"nc", "localhost", "6536"},
filetypes = {"mma", "wl"},
root_dir = util.path.dirname,
}
}
lspconfig.lsp_wl.setup {
on_attach = enhance_attach
} |
Hi.
I am trying to configure neovim's built in LSP for this server. I have been able to get neovim to detect the language server, but it is crashing on launch.
I am getting the same error as in #36, but this is happening even when I am running the language server inside of neovim.
The neovim log shows same thing as commnad line:
Expand
I am able to run the server from Mathematica itself using
Although I don't know if it will help, here's my neovim config for lsp-wl.
Expand
In #36 it was recommended to look at the vs-code client with claim that it would not run into this issue.
Should I try that out to figure out what I can do?
The text was updated successfully, but these errors were encountered: