Skip to content
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

lsp server not working when editing a new java file #1500

Open
pokir opened this issue Oct 8, 2023 · 0 comments
Open

lsp server not working when editing a new java file #1500

pokir opened this issue Oct 8, 2023 · 0 comments

Comments

@pokir
Copy link

pokir commented Oct 8, 2023

Bug description

When creating a new java file with vim (or nvim), the eclipse-jdt-ls server starts running but nothing happens.

I am using the ddc.vim plugin for auto-completion and ale for displaying errors and warnings, with plugins to bridge between vim-lsp and those two plugins. Neither of the two plugins show any information from vim-lsp, so I am guessing the problem is with vim-lsp.

Steps to reproduce

  1. Install eclipse-jdt-ls using :LspInstallServer (if using vim-lsp-settings plugin)
  2. mkdir newFolder && cd newFolder
  3. vim NewFile.java
  4. Wait until :LspStatus displays eclipse-jdt-ls: running
  5. Start writing the keyword public or any other java code and see that vim-lsp does nothing
lsp-not-work.mp4

Environment

vim version: 9.0.1950
nvim version: 0.9.2
OS: macOS 12.6

Relevant parts of my .vimrc (all plugins using the latest version on github):

" To Install Plugins with Vundle: :PluginInstall
" To Update Plugins with Vundle: :PluginUpdate
" To Delete Plugins with Vundle: :PluginClean

" Setting up Vundle
set nocompatible      " be iMproved, required
filetype off          " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim

call vundle#begin()

Plugin 'VundleVim/Vundle.vim'           " let Vundle manage Vundle, required

Plugin 'dense-analysis/ale'             " Linter

Plugin 'prabirshrestha/vim-lsp'         " Use Language Server Protocol
Plugin 'mattn/vim-lsp-settings'         " Easily install LSP servers for vim-lsp

Plugin 'vim-denops/denops.vim'          " Let ddc use deno (javascript)

Plugin 'Shougo/ddc.vim'                 " Autocomplete
Plugin 'Shougo/ddc-ui-native'           " UI for ddc
Plugin 'tani/ddc-fuzzy'                 " Fuzzy matcher, sorter, and converter

" Bridge vim-lsp -> ALE, vim-lsp -> ddc
Plugin 'rhysd/vim-lsp-ale'              " Give LSP info from vim-lsp to ALE for errors and warnings
Plugin 'shun/ddc-source-vim-lsp'        " Give LSP info from vim-lsp to ddc for autocomplete

call vundle#end()

filetype plugin indent on    " required (for Vundle)

" -- ddc plugin settings

call ddc#custom#patch_global('ui', 'native')
call ddc#custom#patch_global('sources', ['vim-lsp'])

call ddc#custom#patch_global('sourceOptions', #{
      \   vim-lsp: #{
      \     mark: 'lsp',
      \   },
      \   _: #{
      \     sorters: ['sorter_fuzzy'],
      \     matchers: ['matcher_fuzzy'],
      \     converters: ['converter_fuzzy'],
      \   },
      \ })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant