-
Notifications
You must be signed in to change notification settings - Fork 48
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
Feature: node executable name (closes #232 #237) #302
base: master
Are you sure you want to change the base?
Conversation
Fix type definition in comments Modify readme
9a9b1db
to
9530703
Compare
@thodnev hey thanks for the pr! .../.local/share/nvim/lazy/plenary.nvim/lua/plenary/job.lua:108: npm: Executable not found
stack traceback:
.../.local/share/nvim/lazy/plenary.nvim/lua/plenary/job.lua:108: in function 'new'
...pt-tools.nvim/lua/typescript-tools/tsserver_provider.lua:76: in function 'new'
...pt-tools.nvim/lua/typescript-tools/tsserver_provider.lua:105: in function 'init'
.../typescript-tools.nvim/lua/typescript-tools/tsserver.lua:38: in function 'new'
.../lazy/typescript-tools.nvim/lua/typescript-tools/rpc.lua:18: in function 'config_cmd'
/usr/share/nvim/runtime/lua/vim/lsp/client.lua:510: in function </usr/share/nvim/runtime/lua/vim/lsp/client.lua:442>
[C]: in function 'pcall'
/usr/share/nvim/runtime/lua/vim/lsp.lua:443: in function 'start_client'
...share/nvim/lazy/nvim-lspconfig/lua/lspconfig/manager.lua:154: in function 'add'
...share/nvim/lazy/nvim-lspconfig/lua/lspconfig/manager.lua:284: in function <...share/nvim/lazy/nvim-lspconfig/lua/lspconfig/manager.lua:271>
[C]: in function 'pcall'
...l/share/nvim/lazy/nvim-lspconfig/lua/lspconfig/async.lua:5: in function <...l/share/nvim/lazy/nvim-lspconfig/lua/lspconfig/async.lua:4> |
@qwexvf Thanks! -- init.lua
-- Plugins used by lazy.nvim
local plugins = {
-- ...
-- Local plugin
{dir = vim.fn.stdpath('config') .. '/typescript-tools.nvim',
dependencies = {'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig'},
opts = {
settings = {
tsserver_node_executable = 'bun'
}
}}
} The other problem is that bun itself (unless forced to do otherwise with BUT. Even with
It happens unless I patch the diff -u a/tsserver b/tsserver
--- a/tsserver
+++ b/tsserver
@@ -1,2 +1,2 @@
-#!/usr/bin/env node
+#!/usr/bin/env bun
require('../lib/tsserver.js') Then finally I get bun working with all it brewed properly, and a proper process tree:
We have nothing to do with these bun & typescript policies. A proper support without patching will be added sooner or later. |
@thodnev thanks for the detailed response and i can confirm that your method above works perfectly! |
@qwexvf That is great news! But it can be installed with npm if it is present on target system. And global installs will not pollute the system dirs, as bun is currently distributed as just one executable with all the batteries included. So Another option would be to run their official install script. I haven't looked much into it, as running directly downloaded bash scripts is not everyone likes doing. But their script does not require running with root privileges, so probably it is not that big deal And running these commands could be packed into nvim bootstrap, for example, like lazy does here Another good option for future could be adding bun to mason.nvim, as a more nvim-native tooling solution. I have looked through Mason package list, unfortunately neither bun nor npm aren't provided there yet |
Allows providing tsserver runtime names other than node, i.e bun (for improved perfomance), etc.
Closes #232 #237
Contains fixes to summarized proposals by the others in #232.
If someone has access to Windows machine, could you test it once again and we're good to go