2023-11-20 15:13:13 +00:00
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
2023-11-22 13:11:41 +00:00
|
|
|
home.packages = with pkgs; [
|
2023-12-03 19:54:43 +00:00
|
|
|
nodePackages.prettier
|
2023-11-22 13:11:41 +00:00
|
|
|
nodePackages.typescript-language-server
|
|
|
|
];
|
|
|
|
|
2023-11-20 15:13:13 +00:00
|
|
|
programs.neovim = {
|
|
|
|
nvim-lspconfig = ''
|
2023-12-03 19:54:43 +00:00
|
|
|
require('init.lsp').setup(require('lspconfig').tsserver) {
|
|
|
|
on_attach = function(client, bufnr)
|
|
|
|
require('init.lsp').on_attach(client, bufnr)
|
|
|
|
-- Override the default formatter in typescript-language-server.
|
|
|
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gq', "<CMD>PrettierAsync<CR>", {
|
|
|
|
silent = true,
|
|
|
|
})
|
|
|
|
end,
|
|
|
|
}
|
2023-11-20 15:13:13 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|