Best way to add custom autocomplete/annotations? #6643
Replies: 3 comments 4 replies
-
I'm also looking for a way to do this, in VSC, the extension supports a workspace based library setting that you can feed files/folders to, an equivalent to this in Zed would be great. |
Beta Was this translation helpful? Give feedback.
-
@Stanzilla The editor-agnostic way to configure LuaLS is with |
Beta Was this translation helpful? Give feedback.
-
I think a per-project Notably LuaLS supports The second question is how to have your project find external stubs:
@gingerbeardman I changed the format of links in annotations to use markdown to make them clickable in Zed in response to the above, thanks for catching that. Commit here: notpeter/playdate-luacats@98861f1 The above is focused on Lua autocomplete/annotations in Zed via LuaLS, but if you wanted to move beyond that you Zed supports code intelligence (autocomplete, snippets, linting, etc) custom language servers and to a lesser extent via tree-sitter grammars. |
Beta Was this translation helpful? Give feedback.
-
I'm a Playdate developer, and this system has its own SDK with functions written in Lua.
I managed to get autocompletition/hints to pick up the Playdate function definitions after reading:
To do so I use the stub.lua and .luarc.json from either of
...and add them to my project folder.
Anyway, I'm new to Zed so I'm wondering if this is the best way?
Minimal
![Screen shot 2023-12-10 at 15 45 25](https://private-user-images.githubusercontent.com/49612/289369527-1e11ca68-a073-46dd-b339-f039ff8933cc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk5ODY2ODUsIm5iZiI6MTcxOTk4NjM4NSwicGF0aCI6Ii80OTYxMi8yODkzNjk1MjctMWUxMWNhNjgtYTA3My00NmRkLWIzMzktZjAzOWZmODkzM2NjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzAzVDA1NTk0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ0NTZmZWZhZDAyNDcxMjljOTNmODNjNzI5ZTM2MGFmYTYzZDY2MGE3ODZjMjQ0NDMzOWZiY2E4ZDQ2YzU4MTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.viVRu6-ePw_Fd5Bxo4AROjAtK05KA6wSKaDxNo5ZpP4)
Detailed
![Screen shot 2023-12-10 at 15 53 57](https://private-user-images.githubusercontent.com/49612/289370072-e4924da0-1922-4c42-a4b9-65f9d2317ed2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk5ODY2ODUsIm5iZiI6MTcxOTk4NjM4NSwicGF0aCI6Ii80OTYxMi8yODkzNzAwNzItZTQ5MjRkYTAtMTkyMi00YzQyLWE0YjktNjVmOWQyMzE3ZWQyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzAzVDA1NTk0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVhMGE0ZmNiMTg4Y2ZlNDc4M2QyM2Y5YmYzNzVmOWVlNjk5ZWZjNWVmNjAzZGY2ZjVlNTdlYTEyYzNhZGQ4ZTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.0d7KTiwZwqkDnNo9EQBhgj4yWdUI4d_M5O5rn2PEAuU)
I can modify the stub.lua to markdown format all URLs to make them clickable in the annotation.
Beta Was this translation helpful? Give feedback.
All reactions