-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
vim-patch:8.2.3520: cannot define a function for thesaurus completion #16047
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You forgot to add BV_THSFU
to option_defs.h
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- There's a few lint failures that
make lint
shouid've caught. https://github.com/neovim/neovim/blob/master/CONTRIBUTING.md#coding - This doesn't compile as per @zeertzjq's comment.
I think you also need to port patch 8.2.3521 and 8.2.3525. |
...and 8.2.3528 |
all 8.2.3521, 8.2.3525, and 8.2.3528 should be included. |
This isn't compiling and lint still needs addressing |
@seandewar and I would need a help with that definition in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style comments to help appease the linter
Not sure, what's the deal with the Windows build. |
The MSVC_32 test also fails on master, so I think you can ignore it. |
This PR now has merge conflicts and needs a rebase. |
Fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many of these comments are probably nit-picks, but functionally I think this PR looks good.
We'll have to see what janlazo thinks 👍
Problem: Cannot define a function for thesaurus completion. Solution: Add 'thesaurusfunc'. (Yegappan Lakshmanan, closes vim/vim#8987, closes 8950) vim/vim@160e994
Problem: Options completion test fails. Solution: Add 'thesaurusfunc' to the results. vim/vim@abdcfd1
Problem: Option variable name does not match option name. (Christ van Willigen) Solution: Rename the variable. vim/vim@d4c4bfa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, ignoring style changes.
Fix the code style, address thesaurus_func_complete()
, and I'll merge.
…ame scope Problem: 'thesaurus' and 'thesaurusfunc' do not have the same scope. Solution: Make 'thesaurusfunc' global-local. vim/vim@f4d8b76
Thank you very much, @janlazo. |
@mcepl Thanks for your contribution. |
How can I use this in my
But I can't seem to work out the synax for |
I have this: func Thesaur(findstart, base)
if a:findstart
return searchpos('\<', 'bnW', line('.'))[1] - 1
endif
let res = []
let h = ''
for l in systemlist('aiksaurus '.shellescape(a:base))
if l[:3] == '=== '
let h = '('.substitute(l[4:], ' =*$', ')', '')
elseif l ==# 'Alphabetically similar known words are: '
let h = "\U0001f52e"
elseif l[0] =~ '\a' || (h ==# "\U0001f52e" && l[0] ==# "\t")
call extend(res, map(split(substitute(l, '^\t', '', ''), ', '),
\ {_, val -> {'word': val, 'menu': h}}))
endif
endfor
return res
endfunc
set thesaurusfunc=Thesaur |
@mcepl Can you re-create that in an |
I probably could, but it is just a waste of time. Put this into |
@mcepl I did the following and it worked, thanks for answering. Lua solution is optimal, but I can't be bothered myself :)
|
Problem: Cannot define a function for thesaurus completion.
Solution: Add 'thesaurusfunc'. (Yegappan Lakshmanan, closes vim/vim#8987,
closes 8950)
vim/vim@160e994