beerman
beerman
DDeno
Created by y@ on 4/26/2024 in #help
Neovim setup with LSP formatting & linting
Actually, I don't even think you need to include the configuration for js and ts since denols will run those for you and conform automatically handles lsp formatters if you have lsp_fallback enabled.
16 replies
DDeno
Created by y@ on 4/26/2024 in #help
Neovim setup with LSP formatting & linting
If you just want to quickly get up and running, add denols to your list of servers in your lspconfig, making sure that deno.enable and deno.lint are both set to true. Next, add this plugin https://github.com/stevearc/conform.nvim and include the following in its setup options:
local options = {
formatters_by_ft = {
lua = { "stylua" },
css = { "deno_fmt" },
html = { "deno_fmt" },
javascript = { "deno_fmt" },
typescript = { "deno_fmt" },
json = { "deno_fmt" },
jsonc = { "deno_fmt" },
javascriptreact = { "deno_fmt" },
typescriptreact = { "deno_fmt" },
markdown = { "deno_fmt" },
},

format_on_save = {
enabled = true,
timeout_ms = 2000,
lsp_fallback = true,
},
}
local options = {
formatters_by_ft = {
lua = { "stylua" },
css = { "deno_fmt" },
html = { "deno_fmt" },
javascript = { "deno_fmt" },
typescript = { "deno_fmt" },
json = { "deno_fmt" },
jsonc = { "deno_fmt" },
javascriptreact = { "deno_fmt" },
typescriptreact = { "deno_fmt" },
markdown = { "deno_fmt" },
},

format_on_save = {
enabled = true,
timeout_ms = 2000,
lsp_fallback = true,
},
}
16 replies
DDeno
Created by y@ on 4/26/2024 in #help
Neovim setup with LSP formatting & linting
ESLint is not a formatter - it's a linter.
16 replies
DDeno
Created by y@ on 4/26/2024 in #help
Neovim setup with LSP formatting & linting
Listen to me, do yourself a favour and start reading documentation :h lspconfig is a good start.
16 replies
DDeno
Created by y@ on 4/26/2024 in #help
Neovim setup with LSP formatting & linting
It appears that you don't even know how neovim works.
16 replies
DDeno
Created by y@ on 4/26/2024 in #help
Neovim setup with LSP formatting & linting
What are you talking about?
16 replies
DDeno
Created by y@ on 4/26/2024 in #help
Neovim setup with LSP formatting & linting
Install conform then add your deno formatter to ft by file type and enable format on save
16 replies
DDeno
Created by beerman on 1/10/2023 in #help
Trouble importing npm modules
11 replies
DDeno
Created by beerman on 1/10/2023 in #help
Trouble importing npm modules
11 replies
DDeno
Created by beerman on 1/10/2023 in #help
Trouble importing npm modules
11 replies
DDeno
Created by beerman on 1/10/2023 in #help
Trouble importing npm modules
Hey, I use "dev": "deno run -A --node-modules-dir npm:vite",
11 replies
DDeno
Created by beerman on 1/10/2023 in #help
Trouble importing npm modules
Yes, absolutely. Copied from my node project. https://www.npmjs.com/package/@web3-onboard/core
11 replies
DDeno
Created by beerman on 1/9/2023 in #help
Trouble importing modules
Cannot find module 'npm:@web3-onboard/core@^2.8.2' imported from '/Users/jakubdonovan/Documents/code/deno-sveltekit/src/lib/web3.ts'
3 replies
DDeno
Created by beerman on 1/9/2023 in #help
Trouble importing modules
3 replies
DDeno
Created by beerman on 11/10/2022 in #help
axios gives me a CORS error, fetch doesn't. Why is that?
That seems to have worked
64 replies
DDeno
Created by beerman on 11/10/2022 in #help
axios gives me a CORS error, fetch doesn't. Why is that?
restarted the localhost multiple times as well
64 replies