formating
This commit is contained in:
parent
0eea4c8dab
commit
16e0df81f4
5 changed files with 23 additions and 13 deletions
|
|
@ -8,5 +8,5 @@ trim_trailing_whitespace = true
|
|||
insert_final_newline = true
|
||||
|
||||
[*.lua]
|
||||
max_line_length = 80
|
||||
max_line_length = 120
|
||||
align_array_table = false
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
"output-panel.nvim": { "branch": "main", "commit": "9979f9988acb35fd8e699d8b1fbc7aa17c9d8148" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "c91fa46fc8d79f5577beac70a459f30ec17a60c2" },
|
||||
"schemastore.nvim": { "branch": "main", "commit": "d307d291f38678d064cb987112926df6d9134de3" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
return {
|
||||
'saghen/blink.cmp',
|
||||
dependencies = 'rafamadriz/friendly-snippets',
|
||||
dependencies = { 'rafamadriz/friendly-snippets' },
|
||||
version = '*',
|
||||
|
||||
---@module 'blink.cmp'
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
if not client then return end
|
||||
|
||||
if vim.bo.filetype == "lua" or client.name == "jdtls" then
|
||||
local LSP_CLIENT_NAMES_FORMAT_ON_SAVE = { "lua_ls", "jdtls" }
|
||||
for _, client_name_autoformat in ipairs(LSP_CLIENT_NAMES_FORMAT_ON_SAVE) do
|
||||
if client.name == client_name_autoformat then
|
||||
-- Format the current buffer on save
|
||||
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||
buffer = args.buf,
|
||||
|
|
@ -39,6 +41,7 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||
end,
|
||||
})
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
|
@ -56,7 +59,8 @@ return {
|
|||
tools_to_install = {
|
||||
"lua-language-server", "vtsls", "ruff", "mypy", "black",
|
||||
"pyright", "tailwindcss-language-server",
|
||||
"eslint-lsp", "lemminx", "gopls"
|
||||
"eslint-lsp", "lemminx", "gopls", "prettierd", "dotenv-linter",
|
||||
"editorconfig-checker", "proselint"
|
||||
}
|
||||
},
|
||||
config = function(_, opts)
|
||||
|
|
@ -82,7 +86,11 @@ return {
|
|||
format_on_save(client, bufnr)
|
||||
end,
|
||||
sources = {
|
||||
null_ls.builtins.formatting.prettier,
|
||||
null_ls.builtins.formatting.prettierd,
|
||||
|
||||
null_ls.builtins.diagnostics.dotenv_linter,
|
||||
null_ls.builtins.diagnostics.editorconfig_checker,
|
||||
null_ls.builtins.diagnostics.proselint
|
||||
},
|
||||
})
|
||||
end
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@ return {
|
|||
"html",
|
||||
"jsdoc",
|
||||
"hurl",
|
||||
"typescript"
|
||||
"typescript",
|
||||
"json"
|
||||
},
|
||||
sync_install = false,
|
||||
highlight = { enable = true },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue