Deno runtime, specifically their new Fresh web framework. I have two tweaks that ensure developer experience just works™ and is comparable to building with other Node-based frameworks.
I initially spun up the the example my-project
covered in the Fresh docs.
Thankfully, Deno already has an extensive configuration file for setting up each project. First, I put this file in a my-project.sublime-project
at the root level directory.
Then, install the LSP-Deno
package to get proper language server support.
These worked well, but I was still seeing a number of linter errors due to the LSP-typescript
package I installed as part of my Next.js setup.
Finally, in the my-project.sublime-project
file add two snippets. The first (“folders”) ensures the current folder is included in the project sidebar. Second, a snippet under the settings > LSP
data keys ensures that the Typescript language server is swapped for its Deno replacement:
{
"folders": [
{
"path": "."
}
],
"settings": {
"LSP": {
"deno": {
"command": ["deno", "lsp"]
// The rest of Deno's default config here...
},
"Deno": {
"enabled": true
},
"LSP-typescript": {
"enabled": false
}
}
}
}
If the new changes aren’t taking effect, make sure to open this project file using Sublime’s Open Project… option under the Project menu, so it loads in the custom configurations.