Skip to content

fix(util): error when filetype is nil - #341

Closed
doums wants to merge 1 commit into
zbirenbaum:masterfrom
doums:fix_ft_util
Closed

fix(util): error when filetype is nil#341
doums wants to merge 1 commit into
zbirenbaum:masterfrom
doums:fix_ft_util

Conversation

@doums

@doums doums commented Nov 19, 2024

Copy link
Copy Markdown
Contributor

Hi, on latest nvim v0.11.0-dev-1190+gc12be1249f this PR fixes the following issue, preventing Copilot to work

Error executing vim.schedule lua callback: ...e/.local/share/nvim/dev/copilot.lua/lua/copilot/util.lua:143: bad argument #1 to 'gsub' (string expected, got
nil)
stack traceback:
        [C]: in function 'gsub'
        ...e/.local/share/nvim/dev/copilot.lua/lua/copilot/util.lua:143: in function 'get_language_id'
        /usr/share/nvim/runtime/lua/vim/lsp/client.lua:1030: in function '_text_document_did_open_handler'
        /usr/share/nvim/runtime/lua/vim/lsp/client.lua:1049: in function '_on_attach'
        /usr/share/nvim/runtime/lua/vim/lsp/client.lua:631: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

@doums

doums commented Nov 19, 2024

Copy link
Copy Markdown
Contributor Author

closing, dup /pull/340

@doums doums closed this Nov 19, 2024
@folke

folke commented Nov 19, 2024

Copy link
Copy Markdown

Has been fixed in core in the meantime, so should be ok with tonight's nightly

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

Successfully merging this pull request may close these issues.

2 participants