Conversation
|
Interesting proposal for that feature, thank you for taking the time. I am not sure however that I want to include it if partially completed. I think we need it on |
|
The typescript lsp does not give autocomplete in this way in non-js files. I do not know how to fix that. |
|
@gruvw @Amzd thank you both for the plugin and the tutorial to compile the docs. It works great w/ Is there an inherent benefit of |
|
I think you can use vim.filetype.add()? Example: |
|
From what I can tell lack of .str support is an issue with the TypeScript lsp that you see a lot in projects that use a modified version of another language (e.g. using html like templating languages such as ejs). This doesn't seem like an issue the contributor can fix since the solution is to use something like filetype.add or your lsp config to tell nvim to treat .str files as .js files (unless you want to write your own lsp from scratch). |
That could be a solution. I currently have two issues with this feature/PR:
I am not a fan of shipping the LSP feature with these two problems. It's more of a workaround for the moment. I think writing a small LSP could maybe fix both of these issues and give us more control. Thoughts? |
|
|
|
Since the limitation comes from the TS LSP and isn’t fixable inside the plugin, would it make sense to merge this as “optional docs for users who want autocomplete today”, while a proper |
|
I'm not sure that this workaround should be part of the plugin's repository, as I don't personally like this solution. I think it's fine to leave the PR as is for people that want to dig into workarounds and setup an LSP, but I would rather go straight up and motivate a few people to work on an actual solution instead. I am currently doing many other things, so I can't take the time to develop that rn but I certainly will in the future if nobody else does it before :) |
This PR adds doc for how to get code completion for strudel functions. Sadly this only works in
.js,.mjs,.tsfile extensions (maybe some more js related extensions) as otherwise the LSP does not give suggestions for code from the same module.