Skip to content

Commit

Permalink
perf(null-ls): Deprecating builtins
Browse files Browse the repository at this point in the history
  • Loading branch information
liubang committed Feb 25, 2024
1 parent b5cbf8e commit a89faba
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
8 changes: 7 additions & 1 deletion lua/plugins/aerial-nvim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,20 @@ return {
"stevearc/aerial.nvim", -- {{{
cmd = "AerialToggle",
opts = {
backends = { "lsp", "markdown" },
backends = { "lsp", "markdown", "man" },
layout = {
default_direction = "prefer_right",
placement = "edge",
},
attach_mode = "window", -- 'window' | 'global'
nerd_font = "auto",
show_guides = true,
guides = {
mid_item = "├╴",
last_item = "└╴",
nested_top = "",
whitespace = " ",
},
keymaps = {
["<CR>"] = false,
["o"] = "actions.jump",
Expand Down
31 changes: 10 additions & 21 deletions lua/plugins/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@ return {
config = function()
local have_mason, mlsp = pcall(require, "mason-lspconfig")
if have_mason then
mlsp.setup({ ensure_installed = { "clangd", "gopls", "lua_ls", "rust_analyzer" } })
mlsp.setup({
ensure_installed = {
"clangd",
"gopls",
"lua_ls",
"rust_analyzer",
},
})
end
-- It's important that you set up the plugins in the following order:
-- 1. mason.nvim
Expand All @@ -75,15 +82,6 @@ return {
b.formatting.cmake_format,
b.formatting.asmfmt,
b.formatting.buildifier,
b.formatting.fixjson,
b.formatting.latexindent.with({
args = {
"-g",
"/dev/null",
"-y",
[[defaultIndent: " "]],
},
}),
b.formatting.prettier.with({
filetypes = {
"css",
Expand All @@ -99,20 +97,11 @@ return {
"handlebars",
},
}),
b.formatting.eslint_d.with({
filetypes = {
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
},
}),
b.formatting.shfmt,
b.diagnostics.shellcheck,
b.code_actions.gomodifytags,
b.code_actions.impl,
b.diagnostics.buildifier,
b.diagnostics.actionlint,
b.diagnostics.eslint_d,
},
})
end,
Expand Down
9 changes: 8 additions & 1 deletion lua/plugins/snips/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ return {
build = (not jit.os:find("Windows"))
and "echo 'NOTE: jsregexp is optional, so not a big deal if it fails to build'; make install_jsregexp"
or nil,
dependencies = { "rafamadriz/friendly-snippets" },
dependencies = {
{
"rafamadriz/friendly-snippets",
config = function()
require("luasnip.loaders.from_vscode").lazy_load()
end,
},
},
opts = {
history = true,
delete_check_events = "TextChanged",
Expand Down

0 comments on commit a89faba

Please sign in to comment.