SpaceVim / SpaceVim

A modular Vim/Neovim configuration
https://spacevim.org/
GNU General Public License v3.0
20.33k stars 1.41k forks source link

PHP LSP not installable #3480

Closed programmador closed 4 years ago

programmador commented 4 years ago

While trying to install PHP and LSP plugin installation is launched after next restart. For "Php-language-server" spacevim shows percents running from 0 to 100 really lots of times. After investigating ~/.cache/vimfiles contents I've figured out that each of 0-100 iterations is an installation of a specific composer dependency for php language server. But after everything seems to be downloaded nothing works actually. And I could see nothing special in debug info. Just a plugin installer says "Building failed" and that's all. Is there a way to make Spacevim more verbose while installing plugins? Maybe my problem is smth individual such as specific neorvim or PHP version issue.

BTW there are several PHP language server implementation existing at the moment. And only a single one is currently available in SpaceVim according to the doc. I've seen a merge request that added lsp-php support to Spacevim and as I understood there's no option to skip downloading default php language server though probably I could try using inteliphense or any other language server by setting [layers.override_cmd]. I thought it would be better to try a default solution but as I mentioned above I couldn't install it.

Expected behavior, english is required

Should at least install lsp server successfully

The reproduce ways from Vim starting (Required!)

add lang#php and lsp (with filetypes=["php"]) layers

Environment Information

On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

Output of the :SPDebugInfo!

SpaceVim debug information ### SpaceVim options : ```toml auto_disable_touchpad = 1 autocomplete_method = 'coc' autocomplete_parens = 1 buffer_index_type = 4 checkinstall = 1 colorscheme = 'gruvbox' colorscheme_bg = 'dark' colorscheme_default = 'desert' commandline_prompt = '➭' custom_color_palette = [] custom_plugins = [] data_dir = '/home/alexander/.cache/' debug_level = 1 default_indent = 2 disabled_plugins = [] enable_ale = 0 enable_bepo_layout = 0 enable_cursorcolumn = 0 enable_cursorline = 1 enable_debug = 0 enable_googlesuggest = 0 enable_guicolors = 0 enable_insert_leader = 1 enable_javacomplete2_py = 0 enable_key_frequency = 0 enable_language_specific_leader = 1 enable_neocomplcache = 0 enable_neomake = 1 enable_os_fileformat_icon = 0 enable_powerline_fonts = 1 enable_statusline_bfpath = 0 enable_statusline_mode = 0 enable_statusline_tag = 1 enable_tabline_filetype_icon = 0 enable_tabline_ft_icon = 0 enable_vimfiler_filetypeicon = 0 enable_vimfiler_gitstatus = 0 enable_vimfiler_welcome = 1 enable_ycm = 0 error_symbol = '✖' expand_tab = 1 filemanager = 'vimfiler' filetree_direction = 'right' filetype_icons = {} force_global_config = 0 gitcommit_issue_icon = '' gitcommit_pr_icon = '' github_username = '' guifont = '' hiddenfileinfo = 1 home_files_number = 6 hosts_url = 'https://raw.githubusercontent.com/racaljk/hosts/master/hosts' info_symbol = 'ⓘ' keep_server_alive = 1 language = '' leader_guide_default_group_name = '' leader_guide_flatten = 1 leader_guide_hspace = 5 leader_guide_max_size = 0 leader_guide_position = 'botright' leader_guide_run_map_on_popup = 1 leader_guide_sort_horizontal = 0 leader_guide_submode_mappings = {'': 'win_close'} leader_guide_vertical = 0 lint_on_save = 1 lint_on_the_fly = 0 max_column = 120 plugin_bundle_dir = '/home/alexander/.cache/vimfiles/' plugin_manager = 'dein' plugin_manager_processes = 16 plugin_name = 'vim-phpspec' project_rooter_automatically = 1 project_rooter_patterns = ['.git/', '_darcs/', '.hg/', '.bzr/', '.svn/', '.SpaceVim.d/'] realtime_leader_guide = 1 relativenumber = 1 search_tools = ['rg', 'ag', 'pt', 'ack', 'grep', 'findstr'] sidebar_direction = '' sidebar_width = 30 smartcloseignoreft = ['tagbar', 'vimfiler', 'defx', 'SpaceVimRunner', 'SpaceVimREPL', 'SpaceVimQuickFix', 'HelpDescribe', 'VebuggerShell', 'VebuggerTerminal', 'SpaceVimTabsManager'] smartcloseignorewin = ['__Tagbar__', 'vimfiler:default'] snippet_engine = 'neosnippet' src_root = 'E:\sources\' statusline_inactive_separator = 'bar' statusline_iseparator = 'nil' statusline_left_sections = ['winnr', 'filename', 'major mode', 'search count', 'syntax checking', 'minor mode lighters'] statusline_right_sections = ['fileformat', 'cursorpos', 'percentage'] statusline_separator = 'nil' statusline_unicode_symbols = 0 terminal_cursor_shape = 2 todo_labels = ['@fixme', '@question', '@todo', '@idea'] update_retry_cnt = 3 version = '1.5.0-dev' vim_help_language = 'en' vimcompatible = 1 warning_symbol = '⚠' wildignore = '*/tmp/*,*.so,*.swp,*.zip,*.class,tags,*.jpg,*.ttf,*.TTF,*.png,*/target/*,.git,.svn,.hg,.DS_Store,*.svg' windows_index_type = 3 windows_leader = '' windows_smartclose = '' ``` ### SpaceVim layers : ```toml [[layers]] name="autocomplete" [[layers]] name="checkers" [[layers]] name="format" [[layers]] name="edit" [[layers]] name="ui" [[layers]] name="core" [[layers]] name="core#banner" [[layers]] name="core#statusline" [[layers]] name="core#tabline" [[layers]] name="lsp" filetypes=['php'] [[layers]] name="shell" default_position='top' default_height=30 [[layers]] name="lang#dart" [[layers]] name="lang#php" [[layers]] name="-l" ``` ### SpaceVim Health checking : SpaceVim clipboard support check report: Checking +clipboard: SUCCEED! SpaceVim environment check report: Current progpath: nvim(/usr/bin/nvim) version: 800 OS: linux [shell, shellcmdflag, shellslash]: ['/usr/bin/fish', '-c', 0] SpaceVim lua support check report: Checking +lua: Failed : Known issue, neovim do not support lua now. SpaceVim python support check report: Checking +python3: Failed : to support +python3, you need run `pip3 install neovim` Checking +python: Failed : to support +python, you need run `pip2 install neovim` ### SpaceVim runtime log : ```log [ SpaceVim ] : logger file does not exists, only log for current process will be shown! [ SpaceVim ] [02:40:30] [ Info ] Startup with no argv, current dir is used: ~/code/antifraud [ SpaceVim ] [02:40:30] [ Info ] Can not find project local config, start loading global config [ SpaceVim ] [02:40:30] [ Info ] start to apply config [glob] [ SpaceVim ] [02:40:30] [ Info ] SpaceVim server startup at:/tmp/spacevim_nvim_server [ SpaceVim ] [02:40:31] [ Info ] Start to find root for: /home/alexander/code/antifraud/ [ SpaceVim ] [02:40:31] [ Info ] (.git/):/home/alexander/code/antifraud [ SpaceVim ] [02:40:31] [ Info ] buffer name: [ SpaceVim ] [02:40:31] [ Info ] change to root: /home/alexander/code/antifraud [ SpaceVim ] [02:40:31] [ Info ] try to open SpaceVim welcome page [ SpaceVim ] [02:40:31] [ Info ] Start to find root for: /home/alexander/code/antifraud/ [ SpaceVim ] [02:40:31] [ Info ] (.git/):/home/alexander/code/antifraud [ SpaceVim ] [02:40:31] [ Info ] buffer name: [ SpaceVim ] [02:40:31] [ Info ] change to root: /home/alexander/code/antifraud [ SpaceVim ] [02:50:55] [ Warn ] [ plug manager ] Reinstalling Failed Plugins. Remaining Retries: 3 [ SpaceVim ] [02:50:56] [ Warn ] [ plug manager ] Reinstalling Failed Plugins. Remaining Retries: 2 [ SpaceVim ] [02:50:57] [ Warn ] [ plug manager ] Reinstalling Failed Plugins. Remaining Retries: 1 [ SpaceVim ] [03:01:02] [ Info ] buffer name: [ SpaceVim ] [03:01:02] [ Info ] change to root: /home/alexander/code/antifraud [ SpaceVim ] [03:01:05] [ Info ] buffer name: [ SpaceVim ] [03:01:05] [ Info ] change to root: /home/alexander/code/antifraud [ SpaceVim ] [03:02:05] [ Info ] Start to find root for: /home/alexander/code/antifraud/ [ SpaceVim ] [03:02:05] [ Info ] (.git/):/home/alexander/code/antifraud [ SpaceVim ] [03:02:05] [ Info ] buffer name: [ SpaceVim ] [03:02:05] [ Info ] change to root: /home/alexander/code/antifraud [ SpaceVim ] [03:04:04] [ Info ] Start to find root for: /home/alexander/code/antifraud/SpaceVimLayers [ SpaceVim ] [03:04:04] [ Info ] (.git/):/home/alexander/code/antifraud [ SpaceVim ] [03:04:04] [ Info ] buffer name: SpaceVimLayers [ SpaceVim ] [03:04:04] [ Info ] change to root: /home/alexander/code/antifraud [ SpaceVim ] [03:04:22] [ Info ] buffer name: [ SpaceVim ] [03:04:22] [ Info ] change to root: /home/alexander/code/antifraud [ SpaceVim ] [03:04:30] [ Info ] Start to find root for: /tmp/nvim17RqOf/1/issue_report.md [ SpaceVim ] [03:04:30] [ Info ] buffer name: /tmp/nvim17RqOf/1/issue_report.md [ SpaceVim ] [03:04:30] [ Info ] change to root: /home/alexander/code/antifraud ```

Screenshots

2020-04-25-03:08:37

wsdjeg commented 4 years ago

@programmador Just move cursor to the plugin name, than press g f, a terminal buffer will be opened. then run composer install && composer run-script parse-stubs

programmador commented 4 years ago

Yes, it's surely my mistake. Usually I'm using everything inside of docker and haven't even had PHP installed. So I was experimenting to determine what actually SpaceVim needs to work properly. It needs php (of course, for language server), yarn (for coc) and... Composer!

Actually I thought that it wouldn't work without composer and first installed it and run SpaceVim. Those multiple 0->100% misleaded me - I thought it's not working as expected and continued experimenting. So when I've figured out that it's actually being installed probably I've already had removed global composer from the host system.

When I saw You answer it leaded me to the root of the problem, thank You very much! After installing composer :SPUpdate has built php-lsp without any troubles.

BTW even intelephense works perfectly, with next config snippet:

[[layers]]
  name = "lsp"
  filetypes = [
    "php"
  ]
  [layers.override_cmd]
    php = ["intelephense", "--stdio"]

Probably it's able to work with any suitable language server.