-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
clink support #2665
Comments
Looks doable, though painful (windows and me aren't the best friends 😄 ).
I don't see yet where you can add a completion for any position (e.g. edit: ok there's loop for that |
rough prototype: local function carapace(word, word_index, line_state, match_builder)
args = { "carapace", "git", "fish", "\"\"" }
for i = 2,word_index,1 do
table.insert(args, line_state:getword(i))
end
-- table.insert(args, word)
output = io.popen(table.concat(args, " ")):read("*a")
for line in string.gmatch(output, '[^\r\n]+') do
-- match_builder:addmatch(line)
match_builder:addmatch(string.gsub(line, '\t.*', ""))
end
return true
end
clink.argmatcher("git")
:addarg({ carapace })
:loop(1) |
Started work in carapace-sh/carapace#1067 . I think there are some quick wins, but fully fledged support will take a while. |
Amazing work already and thanks for jumping on it so quick! I'll gladly help out but its probably going to be a few days for me before I can commit. I don't use Lua that often either unless I'm trying to mod a game or something, but I've played around with it in my Vim & Neovim configs in the past. I'll prob throw some questions at Gemini, Claude or ChatGPT if I get stuck, but I'll make sure that I understand what it is doing & is efficient (not copy & paste). That is if you don't get to it first. Feel free to hold off if you have other things to attend to. You're already spending quite a bit of time for the community, and deserve to have others contributing. In the off chance as well, I see that Clink receives updates pretty regularly and the author may be interested in sharing some ideas. Your project has been so helpful. So I may see about opening an issue there linking to your work thus far, especially if it looks like Clink may need some changes to have proper support. When you said earlier that "windows and me aren't the best friends," I totally get it! I seriously feel bad if you're doing this work if you're not running Windows regularly. I have been a long time Linux user and know that Windows is hostile & invasive, but at some point I needed to use it again for Adobe & all that crap, where there is nothing comparable on Linux. I wish more than anything GPU manufacturers would stop being so monopolistic & antitrust and provide vGPU support on consumer cards. At least that way I would have GPU acceleration in my apps without needing a secondary video card. |
No worries, I'm just doing a short spike to see if it's feasible. |
Request
Clink offers robust completion configuration utilizing Lua. It is already compatible with Starship. This request is to add carapace support for Clink.
Proposed solution
The documentation for adding completions can be found here. The solution is for either the author of carapace-bin, myself or another contributor to take on the task of adding Clink as a shell for completion support.
Anything else?
No response
Polar
The text was updated successfully, but these errors were encountered: