Merge pull request '[#6]: Add shellcheck, reformat structure' (#8) from feature/#6-add-shellcheck-lsp into main

Reviewed-on: https://xaked.com/xaked/nvim/pulls/8
This commit was merged in pull request #8.
This commit is contained in:
Mykhailo
2023-10-05 11:23:54 +03:00
committed by Gitea Bot
7 changed files with 86 additions and 43 deletions

View File

@@ -23,10 +23,8 @@ require("lazy").setup({
{ import = "lazyvim.plugins.extras.formatting.prettier" },
{ import = "plugins.tokyonight" },
{ import = "plugins.telescope" },
{ import = "plugins.mason" },
{ import = "plugins.none-ls" },
{ import = "plugins.nvim-lspconfig" },
{ import = "plugins.nvim-treesitter" },
{ import = "plugins.lang.markdown" },
{ import = "plugins.lang.shell" },
},
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.

View File

@@ -0,0 +1,41 @@
return {
{
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, {
"marksman",
"mdformat",
})
end,
},
{
"nvimtools/none-ls.nvim",
opts = function(_, opts)
local nls = require("null-ls")
opts.sources = opts.sources or {}
vim.list_extend(opts.sources, {
nls.builtins.formatting.mdformat,
})
end,
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
marksman = {},
},
},
},
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, {
"markdown",
"markdown_inline",
})
end
end,
},
}

View File

@@ -0,0 +1,43 @@
return {
{
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, {
"shfmt",
"shellcheck",
"bash-language-server",
})
end,
},
{
"nvimtools/none-ls.nvim",
opts = function(_, opts)
local nls = require("null-ls")
opts.sources = opts.sources or {}
vim.list_extend(opts.sources, {
-- nls.builtins.code_actions.shellcheck,
-- nls.builtins.diagnostics.shellcheck,
nls.builtins.formatting.shfmt,
})
end,
},
{
"neovim/nvim-lspconfig",
opts = {
servers = {
bashls = {},
},
},
},
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, {
"bash",
})
end
end,
},
}

View File

@@ -1,10 +0,0 @@
return {
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, {
"marksman",
"mdformat",
})
end,
}

View File

@@ -1,10 +0,0 @@
return {
"nvimtools/none-ls.nvim",
opts = function(_, opts)
local nls = require("null-ls")
opts.sources = opts.sources or {}
vim.list_extend(opts.sources, {
nls.builtins.formatting.mdformat,
})
end,
}

View File

@@ -1,8 +0,0 @@
return {
"neovim/nvim-lspconfig",
opts = {
servers = {
marksman = {},
},
},
}

View File

@@ -1,11 +0,0 @@
return {
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
if type(opts.ensure_installed) == "table" then
vim.list_extend(opts.ensure_installed, {
"markdown",
"markdown_inline",
})
end
end,
}