fix
This commit is contained in:
parent
f090ecb4ec
commit
8dafdf51b7
|
@ -16,6 +16,7 @@ git clone --depth 1 https://github.com/wbthomason/packer.nvim\
|
|||
```bash
|
||||
sudo dnf install fd-find ripgrep -y
|
||||
go install github.com/jesseduffield/lazygit@latest
|
||||
sudo npm install -g @fsouza/prettierd
|
||||
```
|
||||
|
||||
### 记忆项
|
||||
|
|
|
@ -1,9 +1,32 @@
|
|||
local prettier = require("prettier")
|
||||
|
||||
prettier.setup({
|
||||
bin = "prettier", -- or `'prettierd'` (v0.22+)
|
||||
filetypes = {
|
||||
"css",
|
||||
"graphql",
|
||||
"html",
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"json",
|
||||
"less",
|
||||
"markdown",
|
||||
"scss",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"yaml",
|
||||
},
|
||||
})
|
||||
|
||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||
local null_ls = require("null-ls")
|
||||
require("null-ls").setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.gofmt,
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.diagnostics.eslint_d.with({
|
||||
diagnostics_format = "[eslint] #{m}\n(#{c})",
|
||||
}),
|
||||
},
|
||||
-- you can reuse a shared lspconfig on_attach callback here
|
||||
on_attach = function(client, bufnr)
|
||||
|
|
|
@ -78,6 +78,7 @@ return require("packer").startup(function(use)
|
|||
})
|
||||
-- 格式化
|
||||
use({ "jose-elias-alvarez/null-ls.nvim" })
|
||||
use({ "MunifTanjim/prettier.nvim" })
|
||||
-- 项目管理
|
||||
use({ "ahmedkhalf/project.nvim" })
|
||||
-- 优化启动速度
|
||||
|
|
Loading…
Reference in New Issue