question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some (all?) sources show errors on registration

See original GitHub issue

Warning: I will close the issue without the minimal init.vim and the reproduction instructions.

Problems summary

Some sources cannot been registered.

…I cannot find this problem out caused by ddc.vim or sources. I detected this in ddc-around, neco-vim, ddc-buffer and so on.

Expected

All sources works good.

Environment Information

  • ddc version (SHA1): 9073abe

  • OS: macOS 11.5.2

  • neovim/Vim :version output:

:version
:version
NVIM v0.6.0-dev+189-g274a3504a
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by jinnouchi.yasushi@O-10413-MAC

Features: +acl +iconv +tui
See ":help feature-compile"

      システム vimrc: "$VIM/sysinit.vim"
       省略時の $VIM: "/usr/local/Cellar/neovim/HEAD-274a350/share/nvim"

Run :checkhealth for more info
続けるにはENTERを押すかコマンドを入力してください
  • :checkhealth or :CheckHealth result(neovim only):
:checkhealth

health#lspconfig#check
========================================================================
## Checking language server protocol configuration
  - INFO: bashls: configuration checked.
  - INFO: denols: configuration checked.
  - INFO: vuels: configuration checked.
  - INFO: yamlls: configuration checked.
  - INFO: vimls: configuration checked.
  - INFO: terraformls: configuration checked.
  - INFO: sourcekit: configuration checked.
  - INFO: solargraph: configuration checked.
  - INFO: pyright: configuration checked.
  - INFO: intelephense: configuration checked.
  - INFO: dockerls: configuration checked.
  - ERROR: cssls: The given command "vscode-css-language-server" is not executable.
  - INFO: clangd: configuration checked.
  - INFO: tsserver: configuration checked.
  - INFO: efm: configuration checked.
  - ERROR: html: The given command "vscode-html-language-server" is not executable.
  - INFO: gopls: configuration checked.
  - INFO: sumneko_lua: configuration checked.
  - INFO: teal: configuration checked.

health#nvim#check
========================================================================
## Configuration
  - OK: no issues found

## Performance
  - OK: Build type: Release

## Remote Plugins
  - OK: Up to date

## terminal
  - INFO: key_backspace (kbs) terminfo entry: key_backspace=^H
  - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
  - INFO: $TERM_PROGRAM='tmux'
  - INFO: $COLORTERM='truecolor'

## tmux
  - OK: escape-time: 0
  - INFO: Checking stuff
  - OK: focus-events: on
  - INFO: $TERM: xterm-256color
  - ERROR: $TERM should be "screen-256color" or "tmux-256color" in tmux. Colors might look wrong.
    - ADVICE:
      - Set default-terminal in ~/.tmux.conf:
          set-option -g default-terminal "screen-256color"
      - https://github.com/neovim/neovim/wiki/FAQ
  - WARNING: Neither Tc nor RGB capability set. True colors are disabled. |'termguicolors'| won't work properly.
    - ADVICE:
      - Put this in your ~/.tmux.conf and replace XXX by your $TERM outside of tmux:
          set-option -sa terminal-overrides ',XXX:RGB'
      - For older tmux versions use this instead:
          set-option -ga terminal-overrides ',XXX:Tc'

health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: pbcopy

## Python 2 provider (optional)
  - WARNING: No Python executable found that can `import neovim`. Using the first available executable for diagnostics.
  - ERROR: Python provider error:
    - ADVICE:
      - provider/pythonx: Could not load Python 2:
          /usr/bin/python2 does not have the "neovim" module. :help |provider-python|
          /usr/bin/python2.7 does not have the "neovim" module. :help |provider-python|
          python2.6 not found in search path or not executable.
          /usr/bin/python does not have the "neovim" module. :help |provider-python|
  - INFO: Executable: Not found

## Python 3 provider (optional)
  - INFO: `g:python3_host_prog` is not set.  Searching for python3 in the environment.
  - INFO: Multiple python3 executables found.  Set `g:python3_host_prog` to avoid surprises.
  - INFO: Executable: /usr/local/bin/python3
  - INFO: Other python executable: /usr/bin/python3
  - INFO: Python version: 3.9.6
  - INFO: pynvim version: 0.4.2 (outdated; from ~/Library/Python/3.9/lib/python/site-packages/neovim)
  - WARNING: Latest pynvim is NOT installed: 0.4.3

## Python virtualenv
  - OK: no $VIRTUAL_ENV

## Ruby provider (optional)
  - INFO: Ruby: ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-darwin20]
  - WARNING: `neovim-ruby-host` not found.
    - ADVICE:
      - Run `gem install neovim` to ensure the neovim RubyGem is installed.
      - Run `gem environment` to ensure the gem bin directory is in $PATH.
      - If you are using rvm/rbenv/chruby, try "rehashing".
      - See :help |g:ruby_host_prog| for non-standard gem installations.

## Node.js provider (optional)
  - INFO: Node.js: v14.15.0
  - INFO: Nvim node.js host: /Users/jinnouchi.yasushi/.nodenv/versions/14.15.0/lib/node_modules/neovim/bin/cli.js
  - WARNING: Package "neovim" is out-of-date. Installed: 4.9.0, latest: 4.10.0
    - ADVICE:
      - Run in shell: npm install -g neovim
      - Run in shell (if you use yarn): yarn global add neovim

## Perl provider (optional)
  - ERROR: perl provider error:
    - ADVICE:
      - "Neovim::Ext" cpan module is not installed

health#treesitter#check
========================================================================
## Checking treesitter configuration
  - INFO: Runtime ABI version : 13

Provide a minimal init.vim/vimrc with less than 50 lines (Required!)

call ddc#custom#patch_global({
      \ 'keywordPattern': '[a-zA-Z_]\w*',
      \ 'smartCase': v:true,
      \ 'sources': ['around'],
      \ 'sourceOptions': {
      \   '_': {'matchers': ['matcher_head']},
      \   'around': {'mark': 'A'},
      \ },
      \ })
call ddc#enable()
let g:denops#debug = 1

See this Dockerfile

How to reproduce the problem from neovim/Vim startup (Required!)

  1. Run this Dockerfile above
  2. nvim .config/nvim/init.vim
  3. Type some texts and wait for a while.
  4. See this error
error
[denops] Error: Failed to call 'registerSource' with [{"name":"around","path":"/root/.local/share/nvim/site/pack/packer/start/ddc-around/denops/ddc/sources/around.ts"}]: TypeError: TS2416 [ERROR]: Property 'gatherCandidates' in type 'Source'
is not assignable to the same property in base type 'BaseSource'.
[denops]   Type '(args: { denops: Denops; sourceParams: Record<string, unknown>; completeStr: string; }) => Promise<Candidate[]>' is not assignable to type '{ (denops: Denops, context: Context, options: DdcOptions, sourceOptions: SourceOption
s, sourceParams: Record<string, unknown>, completeStr: string): Promise<...>; (args: GatherCandidatesArguments): Promise<...>; }'.
[denops]     Types of parameters 'args' and 'denops' are incompatible.
[denops]       Type 'Denops' is missing the following properties from type '{ denops: Denops; sourceParams: Record<string, unknown>; completeStr: string; }': denops, sourceParams, completeStr
[denops]   async gatherCandidates(args: {
[denops]         ~~~~~~~~~~~~~~~~
[denops]     at file:///root/.local/share/nvim/site/pack/packer/start/ddc-around/denops/ddc/sources/around.ts:21:9
[denops]     at async Ddc.registerSource (file:///root/.local/share/nvim/site/pack/packer/start/ddc.vim/denops/ddc/ddc.ts:129:17)
[denops]     at async Session.registerSource (file:///root/.local/share/nvim/site/pack/packer/start/ddc.vim/denops/ddc/app.ts:18:7)
[denops]     at async Session.dispatch (https://deno.land/x/msgpack_rpc@v3.1.0/session.ts:99:12)
[denops]     at async https://deno.land/x/msgpack_rpc@v3.1.0/session.ts:108:18
[denops]     at async Session.handleRequest (https://deno.land/x/msgpack_rpc@v3.1.0/session.ts:104:29)
[denops]     at Session.call (https://deno.land/x/msgpack_rpc@v3.1.0/session.ts:207:13)
[denops]     at async Service.dispatch (file:///root/.local/share/nvim/site/pack/packer/start/denops.vim/denops/@denops-private/service/service.ts:112:14)
[denops]     at async Session.invoke (file:///root/.local/share/nvim/site/pack/packer/start/denops.vim/denops/@denops-private/service/host/nvim.ts:44:16)
[denops]     at async Session.dispatch (https://deno.land/x/msgpack_rpc@v3.1.0/session.ts:99:12)
[denops]     at async Session.handleNotification (https://deno.land/x/msgpack_rpc@v3.1.0/session.ts:130:7)
[denops] Error: Failed to call 'registerFilter' with [{"name":"matcher_head","path":"/root/.local/share/nvim/site/pack/packer/start/ddc-matcher_head/denops/ddc/filters/matcher_head.ts"}]: TypeError: TS2416 [ERROR]: Property 'filter' in type '
Filter' is not assignable to the same property in base type 'BaseFilter'.
[denops]   Type '(args: { sourceOptions: SourceOptions; completeStr: string; candidates: Candidate[]; }) => Promise<Candidate[]>' is not assignable to type '{ (denops: Denops, context: Context, options: DdcOptions, sourceOptions: SourceOption
s, filterOptions: FilterOptions, filterParams: Record<...>, completeStr: string, candidates: Candidate[]): Promise<...>; (args: FilterArguments): Promise<...>; }'.
[denops]     Types of parameters 'args' and 'denops' are incompatible.
[denops]       Type 'Denops' is missing the following properties from type '{ sourceOptions: SourceOptions; completeStr: string; candidates: Candidate[]; }': sourceOptions, completeStr, candidates
[denops]   filter(args: {
[denops]   ~~~~~~
[denops]     at file:///root/.local/share/nvim/site/pack/packer/start/ddc-matcher_head/denops/ddc/filters/matcher_head.ts:8:3
[denops]     at async Ddc.registerFilter (file:///root/.local/share/nvim/site/pack/packer/start/ddc.vim/denops/ddc/ddc.ts:139:17)
[denops]     at async Session.registerFilter (file:///root/.local/share/nvim/site/pack/packer/start/ddc.vim/denops/ddc/app.ts:22:7)
[denops]     at async Session.dispatch (https://deno.land/x/msgpack_rpc@v3.1.0/session.ts:99:12)
[denops]     at async https://deno.land/x/msgpack_rpc@v3.1.0/session.ts:108:18
[denops]     at async Session.handleRequest (https://deno.land/x/msgpack_rpc@v3.1.0/session.ts:104:29)
[denops]     at Session.call (https://deno.land/x/msgpack_rpc@v3.1.0/session.ts:207:13)
[denops]     at async Service.dispatch (file:///root/.local/share/nvim/site/pack/packer/start/denops.vim/denops/@denops-private/service/service.ts:112:14)
[denops]     at async Session.invoke (file:///root/.local/share/nvim/site/pack/packer/start/denops.vim/denops/@denops-private/service/host/nvim.ts:44:16)
[denops]     at async Session.dispatch (https://deno.land/x/msgpack_rpc@v3.1.0/session.ts:99:12)
[denops]     at async Session.handleNotification (https://deno.land/x/msgpack_rpc@v3.1.0/session.ts:130:7)

Screenshot (if possible)

asciicast

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
Shougocommented, Aug 27, 2021

I have fixed almost type errors. Please test the latest version.

Note: For external sources, fix type errors are needed.

0reactions
Shougocommented, Aug 28, 2021

If the problem still exists, it is sources problem. Please report it in the sources issue instead.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PipelineMT Registration Errors and How to Resolve
Go to the Display Corequisite link to view all corequisite courses and corresponding CRNs. You must select both courses and submit both CRNs...
Read more >
Why did I get an error message when registering a new ...
Why did I get an error message when registering a new account? · IP blacklisted temporarily · Password is not secure enough ·...
Read more >
Registration Errors Explained | Raider Success Hub
This page provides helpful explanations of commonly experienced registration errors.
Read more >
Sources of Errors in the Registration Method, 1964 - SAGE Journals
Sources of Errors in the Registration Method · Contents · PDF / ePub · More. Cite article; Share options; Information, rights and permissions;...
Read more >
Registration Errors - UTSA One Stop
This error message appears when you are an undergraduate student attempting to register for graduate level courses without proper authorization. Please see your ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found