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

workspace.onDidOpenTextDocument cannot work #5200

Open
Freed-Wu opened this issue Nov 24, 2024 · 0 comments
Open

workspace.onDidOpenTextDocument cannot work #5200

Freed-Wu opened this issue Nov 24, 2024 · 0 comments

Comments

@Freed-Wu
Copy link

Result from CocInfo

versions

vim version: NVIM v0.10.2
node version: v20.18.0
coc.nvim version: 0.0.82-9fd85781 2024-09-21 00:59:00 +0900
coc.nvim directory: /home/wzy/.local/share/nvim/repos/github.com/neoclide/coc.nvim_release
term: tmux
platform: linux

Log of coc.nvim

2024-11-24T22:30:58.650 INFO (pid:1067148) [plugin] - coc.nvim initialized with node: v20.18.0 after 78
2024-11-24T22:30:58.669 INFO (pid:1067148) [core-watchman] - watchman watching project: /dev/shm/coc-test

Describe the bug

import { ExtensionContext, window, workspace } from 'coc.nvim';

export async function activate(context: ExtensionContext): Promise<void> {

  context.subscriptions.push(workspace.onDidOpenTextDocument(event => {
    window.showInformationMessage("test");
  }));

}
#!/usr/bin/env -S vi -u
set runtimepath=$VIMRUNTIME
set runtimepath+=~/.local/share/nvim/repos/github.com/neoclide/coc.nvim_release
let s:root = fnamemodify(expand('<sfile>'), ':p:h:h')
execute 'set runtimepath+=' . s:root
let g:coc_config_home = '.'
let g:coc_data_home = s:root . '/node_modules/coc'
set formatexpr=CocAction('formatSelected')

Then

tests/test.vim tests/test.vim

Expected:

Display test after open test.vim

Actually:

Nothing happened.

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