cmp-jenkinsfile icon indicating copy to clipboard operation
cmp-jenkinsfile copied to clipboard

Completion not working

Open komildeveloper opened this issue 3 years ago • 7 comments

komildeveloper avatar Aug 11 '22 18:08 komildeveloper

Hey there. Can you give me some context?

What's your configuration look like?

joshzcold avatar Aug 11 '22 22:08 joshzcold

cmp.setup.filetype("Jenkinsfile", { sources = { { name = "jenkinsfile", option = { jenkins_url = "https://jenkins.secmet.co", }, }, { name = "buffer", option = { get_bufnrs = function() return vim.api.nvim_list_bufs() end, }, }, { name = "luasnip" }, }, }),

in my lua/user/cmp.lua

and my gdsl config $HOME/.cache/nvim/cmp-jenkinsfile.gdsl

method(name: 'parallel', type: 'Object', params: ['closures':'java.util.Map'], doc: 'Execute in parallel') method(name: 'parallel', type: 'Object', namedParams: [parameter(name: 'closures', type: 'java.util.Map'), parameter(name: 'failFast', type: 'boolean'), ], doc: 'Execute in parallel')

komildeveloper avatar Aug 12 '22 11:08 komildeveloper

that jenkins_url needs to be a server that you have can get you. Its going to try and pull the GDSL from the jenkins server.

However whats supposed to happen is if $HOME/.cache/nvim/cmp-jenkinsfile.gdsl exists then its supposed to skip the download.

Ill try your example

joshzcold avatar Aug 16 '22 20:08 joshzcold

https://user-images.githubusercontent.com/36175703/184980161-019b9a71-33ca-40d4-8a28-ff0bce80bf0f.mp4

Seems to work, even if I set jenkins_url to a bad value

joshzcold avatar Aug 16 '22 20:08 joshzcold

You configuration snippet is fine. just got it to work with it applied.

maybe you need the :set ft=Jenkinsfile to get cmp to use it?

Do you have Jenkinsfile as a valid filetype?

joshzcold avatar Aug 16 '22 20:08 joshzcold

How did you get syntax highlighting with jenkins file?

Arkoprabho avatar Nov 11 '22 05:11 Arkoprabho

How did you get syntax highlighting with jenkins file?

It's apart of https://github.com/sheerun/vim-polyglot

Which just has a copy of https://github.com/martinda/Jenkinsfile-vim-syntax

joshzcold avatar Nov 11 '22 05:11 joshzcold