Skip to content

Commit

Permalink
modify heirline, add mason-tool-installer
Browse files Browse the repository at this point in the history
  • Loading branch information
convers39 committed Oct 11, 2022
1 parent 59f6baf commit 6351775
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 30 deletions.
20 changes: 20 additions & 0 deletions plugins/heirline.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
return function(config)
-- the first element of the default configuration table is the statusline
config[1] = {
-- set the fg/bg of the statusline
hl = { fg = "fg", bg = "bg" },
-- when adding the mode component, enable the mode text with padding to the left/right of it
astronvim.status.component.mode { mode_text = { padding = { left = 1, right = 1 } } },
-- add all the other components for the statusline
astronvim.status.component.git_branch(),
astronvim.status.component.file_info(),
astronvim.status.component.git_diff(),
astronvim.status.component.diagnostics(),
astronvim.status.component.fill(),
astronvim.status.component.lsp(),
astronvim.status.component.treesitter(),
astronvim.status.component.nav(),
}
-- return the final configuration table
return config
end
5 changes: 5 additions & 0 deletions plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ return {
end,
},

["WhoIsSethDaniel/mason-tool-installer.nvim"] = {
after = "mason.nvim",
config = function() require("user.plugins.mason-tool-installer").setup() end,
},

-- enhancement
["folke/todo-comments.nvim"] = {
requires = "nvim-lua/plenary.nvim",
Expand Down
65 changes: 35 additions & 30 deletions plugins/mason-tool-installer.lua
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
return {
ensure_installed = {
-- Lsp
-- "clangd",
"pyright",
"lua-language-server",
"typescript-language-server",
"rust-analyzer",
"vim-language-server",
"html-lsp",
"css-lsp",
"json-lsp",
"emmet-ls",
local M = {}
function M.setup()
return {
ensure_installed = {
-- Lsp
-- "clangd",
"pyright",
"lua-language-server",
"typescript-language-server",
"rust-analyzer",
"vim-language-server",
"html-lsp",
"css-lsp",
"json-lsp",
"emmet-ls",

-- Formatter
"prettierd",
-- "prettier",
"stylua",
"black",
"yamlfmt",
-- Formatter
"prettierd",
-- "prettier",
"stylua",
"black",
"yamlfmt",

-- Linter
"mypy",
"hadolint",
"eslint_d",
-- "eslint-lsp",
-- Linter
"mypy",
"hadolint",
"eslint_d",
-- "eslint-lsp",

-- Diagnostics
"cspell",
-- Diagnostics
"cspell",

-- Dap
-- "debugpy",
},
}
-- Dap
-- "debugpy",
},
}
end

return M

0 comments on commit 6351775

Please sign in to comment.