Code Monkey home page Code Monkey logo

Comments (19)

SuperAuguste avatar SuperAuguste commented on August 16, 2024

Hey nycex, in all honesty, I have never used Vim before. I don't see any apparent problems in your config, but again, I don't really use ale and deoplete. Could you somehow output an error log and check for any Vim runtime errors?

from zls.

nycex avatar nycex commented on August 16, 2024

I don't have any runtime errors, but I can say that errors (zig syntax errors e.g.) in the file are shown, just the completion doesn't work for me. I'll look into ale and deoplete, maybe there is a mode that shows some debug info.

from zls.

nycex avatar nycex commented on August 16, 2024

So I tried a few things and wasn't able to get any debug output that has something to do with zls besides the execution of zls itself. When trying with latest master though, I was able to get global variable and function completion, though builtins still don't work.

from zls.

alexnask avatar alexnask commented on August 16, 2024

Weird, the builtin completion code sends the same kind of message as the global function completion code.

from zls.

SuperAuguste avatar SuperAuguste commented on August 16, 2024

Weird, the builtin completion code sends the same kind of message as the global function completion code.

That's correct - both send a completion event, they just have different content.

from zls.

SuperAuguste avatar SuperAuguste commented on August 16, 2024

Maybe it's due to lack of snippet syntax support in ale/deoplete?

from zls.

SuperAuguste avatar SuperAuguste commented on August 16, 2024

This seems to indeed be the issue: dense-analysis/ale#1821. This seems to be a problem with ale itself. It seems that other language servers like elixir-ls have the same issue as us with ale snippet support being blocking.

from zls.

nycex avatar nycex commented on August 16, 2024

Yeah, that seems to be the case. I'll close this then.

from zls.

SuperAuguste avatar SuperAuguste commented on August 16, 2024

Very sorry about that @nycex! I'm gonna add a build option to disable snippets and render the plain versions of the builtins later, so you'll be able to use the language server. 😊

from zls.

nycex avatar nycex commented on August 16, 2024

You don't have to be sorry, it makes sense to add this as a snippet feature; it's not your fault my client doesn't support that 🙂. It'd be great if you could add it, as you already said, though 👍.

from zls.

SuperAuguste avatar SuperAuguste commented on August 16, 2024

Nycex, you can now zig build -Dno_snippets to enable no_snippets mode, which as its name indicates, disables all snippets! Thanks for bringing this issue to our attention! This should fix everything, and if it doesn't please, please reopen this issue!

from zls.

nycex avatar nycex commented on August 16, 2024

It still doesn't work, though that might have to do with the @ in front of the completion, deoplete seems to split that, e.g. typing @s gives me a completion list with std in it. Maybe this behaviour is changable, I'll look into it.

Edit: this doesn't seem to be the problem, changing @breakpoint() to breakpoint() in the data files doesn't solve the issue.

from zls.

alexnask avatar alexnask commented on August 16, 2024

Edit: this doesn't seem to be the problem, changing @breakpoint() to breakpoint() in the data files doesn't solve the issue.

The server still only sends the completion if the current character is '@' so I wouldn't expect simply changing the builtin name would fix this if the issue is deoplete's handling of '@'.

Anyway, I will try to test this in some other LSP clients to see if this is a common issue or just deoplete's, I believe @SuperAuguste uses vscode like me so we should test on more clients anyway.

from zls.

nycex avatar nycex commented on August 16, 2024

If it helps, here I have the output and input of zls I can intercept when trying it first with a global function in the file and then with builtin functions: https://bpaste.net/DAOA (the first one is input, the second one output)

from zls.

nycex avatar nycex commented on August 16, 2024

I'm pretty sure it is a problem with the main.zig:413 check, because if I add or true to it, it works, but now only builtin functions work and they are also getting completed if no @ is in front of them (which is obvious of course). I'm not entirely sure if this is a zls problem or a problem with the way deoplete handles those separators.

Edit: After further investigation it seems to be deoplete's fault, because when I add or document.text[pos_index-1] == '@', it actually works, when I type @b<Tab> e.g.. It seems like deoplete doesn't complete deoplete-source (here: ale) specific completion when it is after such a separator.

Edit2: I think char == '@' might not be the best check here, since the completion should also work when you already typed part of the builtin function's name. (this might get fixed by the analysis engine?)

from zls.

SuperAuguste avatar SuperAuguste commented on August 16, 2024

Yep! This will def. be fixed by the analysis engine! char == '@' is a superhacky placeholder. If you just type @ and then press tab, it should work with the current setup.

from zls.

nycex avatar nycex commented on August 16, 2024

I know, but for some reason deoplete expects at least one character after an @ to do completion. I guess I'll leave this open until the analysis is done as far as fixing this?

from zls.

SuperAuguste avatar SuperAuguste commented on August 16, 2024

Fixed! It should work now nycex!

from zls.

nycex avatar nycex commented on August 16, 2024

It does work now! 👍
Also with snippets enabled though - so I don't know if you want to keep the ability to disable them in 🤷.

from zls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.