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

issue importing the autocompletion code to my init.lua #55

Open
jan-sopi opened this issue Jul 7, 2023 · 1 comment
Open

issue importing the autocompletion code to my init.lua #55

jan-sopi opened this issue Jul 7, 2023 · 1 comment

Comments

@jan-sopi
Copy link

jan-sopi commented Jul 7, 2023

with my limited knowledge I decide to attempt to import the autocompletion code provided to lua, which didn't seem that hard since I had already setup some autocommand stuff

local cmd = vim.cmd 
cmd("autocmd User asyncomplete_setup call asyncomplete#register_source({
    \ 'name': 'nim',                                    
    \ 'whitelist': ['nim'],
    \ 'completor': {opt, ctx -> nim#suggest#sug#GetAllCandidates({start, candidates -> asyncomplete#complete(opt['name'], ctx, start, candidates)})}
    \ })")

unfortunately this gave me an error when trying to load nvim

Error detected while processing /home/jan-sopi/.config/nvim/init.lua:
E5113: Error while calling lua chunk: vim/_init_packages.lua:0: /home/jan-sopi/.config/nvim/lua/general.lua:18: unfinished string near '"autocmd User asyncomplete_setup call asyncomplete#register_source({'
stack traceback:
        [C]: in function 'error'
        vim/_init_packages.lua: in function <vim/_init_packages.lua:0>
        [C]: in function 'require'
        /home/jan-sopi/.config/nvim/init.lua:1: in main chunk

so yeah, I'm not sure what's wrong since there doesn't appear to be any "unfinished string". did anyone manage to import the script to lua and if so what did I do wrong?

@alaviss
Copy link
Owner

alaviss commented Jul 20, 2023

For now, please follow the instructions here to integrate the plugin to null-ls: #49

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

2 participants