mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2025-01-07 07:49:49 +01:00
Compare commits
2 commits
ba422b43bc
...
c6567d5146
Author | SHA1 | Date | |
---|---|---|---|
|
c6567d5146 | ||
|
6e2f84ebf9 |
1 changed files with 11 additions and 4 deletions
|
@ -22,10 +22,16 @@
|
||||||
ts_ls = {
|
ts_ls = {
|
||||||
package = pkgs.typescript-language-server;
|
package = pkgs.typescript-language-server;
|
||||||
lspConfig = ''
|
lspConfig = ''
|
||||||
lspconfig.ts_ls.setup {
|
|
||||||
capabilities = capabilities;
|
lspconfig.ts_ls.setup {
|
||||||
on_attach = attach_keymaps,
|
capabilities = capabilities;
|
||||||
cmd = ${
|
on_attach = (
|
||||||
|
function (client, bufnr)
|
||||||
|
attach_keymaps(client, bufnr);
|
||||||
|
client.server_capabilities.documentFormattingProvider = false;
|
||||||
|
end
|
||||||
|
) ,
|
||||||
|
cmd = ${
|
||||||
if isList cfg.lsp.package
|
if isList cfg.lsp.package
|
||||||
then expToLua cfg.lsp.package
|
then expToLua cfg.lsp.package
|
||||||
else ''{"${cfg.lsp.package}/bin/typescript-language-server", "--stdio"}''
|
else ''{"${cfg.lsp.package}/bin/typescript-language-server", "--stdio"}''
|
||||||
|
@ -79,6 +85,7 @@
|
||||||
ls_sources,
|
ls_sources,
|
||||||
null_ls.builtins.formatting.prettier.with({
|
null_ls.builtins.formatting.prettier.with({
|
||||||
command = "${cfg.format.package}/bin/prettier",
|
command = "${cfg.format.package}/bin/prettier",
|
||||||
|
filetypes = { "typescript" },
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue