Giter VIP home page Giter VIP logo

Comments (8)

prabirshrestha avatar prabirshrestha commented on May 30, 2024 1

I sent a PR and verified vim-langauge-server can be installed on mac in neovim as well as start the server and everything works. Please give #56 a try.

from vim-lsp-settings.

johejo avatar johejo commented on May 30, 2024

@mattn Could you add label such as "help wanted", "PR welcome"?

from vim-lsp-settings.

hrsh7th avatar hrsh7th commented on May 30, 2024

I think, We should use termopen function instead of :terminal command if nvim.

from vim-lsp-settings.

nabezokodaikon avatar nabezokodaikon commented on May 30, 2024

Hmm. Seems difficult.
https://github.com/neovim/neovim/blob/e922576bdd6abd6736417343121120b289079565/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim#L42

from vim-lsp-settings.

prabirshrestha avatar prabirshrestha commented on May 30, 2024

I had ported vim-fz to support neovim and vim8. Can someone try something similar to this? mattn/vim-fz#5

from vim-lsp-settings.

sakuraiyuta avatar sakuraiyuta commented on May 30, 2024

I wrote dirty-hack:

diff --git a/plugin/lsp_settings.vim b/plugin/lsp_settings.vim
index 1081bf5..c1bd45a 100644
--- a/plugin/lsp_settings.vim
+++ b/plugin/lsp_settings.vim
@@ -1,3 +1,5 @@
+let s:is_nvim = has('nvim')
+
 if exists('g:loaded_lsp_settings')
   finish
 endif
@@ -96,6 +98,12 @@ function! s:vimlsp_install_server_post(command, job, code) abort
   endif
 endfunction

+if s:is_nvim
+  function! s:vimlsp_install_server_post_nvim(command, job, code, eventtype) abort
+    return s:vimlsp_install_server_post(a:command, a:job, a:code)
+  endfunction
+endif
+
 function! s:vimlsp_install_server() abort
   let l:entry = s:vimlsp_installer()
   let l:servers_dir = get(g:, 'lsp_settings_servers_dir', s:servers_dir)
@@ -104,11 +112,17 @@ function! s:vimlsp_install_server() abort
     call delete(l:server_install_dir, 'rf')
   endif
   call mkdir(l:server_install_dir, 'p')
+
+  if s:is_nvim
+    let l:job = jobstart(l:entry[1], {'cwd': l:server_install_dir, 'on_exit': function('s:vimlsp_install_server_post_nvim', [l:entry[0]])})
+  else
     let l:bufnr = term_start(l:entry[1], {'cwd': l:server_install_dir})
     let l:job = term_getjob(l:bufnr)
     if l:job != v:null
       call job_setoptions(l:job, {'exit_cb': function('s:vimlsp_install_server_post', [l:entry[0]])})
     endif
+  endif
+
 endfunction

 function! s:vimlsp_settings_suggest() abort

I'm unfamilier with vim script, and don't know about normal behavior of :LspInstallServer.
It maybe makes so curious problems.
Hope someone fixes this code.

See also:
neovim/neovim#8364

from vim-lsp-settings.

sakuraiyuta avatar sakuraiyuta commented on May 30, 2024

I also checked #56 on WSL(Ubuntu), looks good to me.

from vim-lsp-settings.

leoatchina avatar leoatchina commented on May 30, 2024

I also tested #56 on macOS, with filetype c, vim, php, bash, java, everything works well.

from vim-lsp-settings.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.