From c92cc60866930a330ddbf5e92996b46a1dab23ee Mon Sep 17 00:00:00 2001
From: William Boman
- Still a WIP - things remain subject to change and documentation is somewhat lacking. - Early feedback is very much appreciated -
- # Table of Contents - [Introduction](#introduction) @@ -38,9 +33,10 @@ etc.) as well as other 3rd party plugins. ## Screenshots -| | | | | -| :--------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: | -|
|
|
|
|
+| | | |
+| :--------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: |
+|
|
|
|
+|
|
|
|
# Requirements
@@ -66,13 +62,13 @@ your personal usage, some of these will also need to be installed. Refer to `:ch
## [Packer](https://github.com/wbthomason/packer.nvim)
```lua
-use { "williamboman/mason.nvim", branch = "alpha" }
+use { "williamboman/mason.nvim" }
```
## vim-plug
```vim
-Plug 'williamboman/mason.nvim', { 'branch': 'alpha' }
+Plug 'williamboman/mason.nvim'
```
# Setup
diff --git a/doc/mason.txt b/doc/mason.txt
index 1e4260eb..acdc8dd0 100644
--- a/doc/mason.txt
+++ b/doc/mason.txt
@@ -18,7 +18,7 @@ Neovim's PATH during setup, allowing easy access for the builtin
shell/terminal as well as other 3rd party plugins.
API reference: ~
- https://github.com/williamboman/mason.nvim/blob/alpha/doc/reference.md
+ https://github.com/williamboman/mason.nvim/blob/main/doc/reference.md
Extensions: ~
- https://github.com/williamboman/mason-lspconfig.nvim
diff --git a/lua/mason/ui/components/header.lua b/lua/mason/ui/components/header.lua
index a4e466db..52aacc7d 100644
--- a/lua/mason/ui/components/header.lua
+++ b/lua/mason/ui/components/header.lua
@@ -6,14 +6,10 @@ return function(state)
return Ui.CascadingStyleNode({ "CENTERED" }, {
Ui.HlTextNode {
Ui.When(state.view.is_showing_help, {
- p.none " ",
p.header_secondary(" " .. state.header.title_prefix .. " mason.nvim "),
- p.Comment " alpha branch",
p.none((" "):rep(#state.header.title_prefix + 1)),
}, {
- p.none " ",
p.header " mason.nvim ",
- p.Comment " alpha branch",
}),
Ui.When(
state.view.is_showing_help,
@@ -21,9 +17,6 @@ return function(state)
{ p.none "press ", p.highlight "?", p.none " for help" }
),
{ p.Comment "https://github.com/williamboman/mason.nvim" },
- {
- p.Comment "Give usage feedback: https://github.com/williamboman/mason.nvim/discussions/new?category=ideas",
- },
},
})
end
diff --git a/lua/mason/ui/components/help/dap.lua b/lua/mason/ui/components/help/dap.lua
index 0dec10cf..6344e234 100644
--- a/lua/mason/ui/components/help/dap.lua
+++ b/lua/mason/ui/components/help/dap.lua
@@ -16,5 +16,12 @@ return function(state)
{
p.none "between a development tool (e.g. IDE or editor) and a debugger.",
},
+ {
+ p.none "This provides editors with a standardized interface for enabling debugging",
+ },
+ {
+ p.none "capabilities - such as pausing execution, stepping through statements,",
+ },
+ { p.none "and inspecting variables." },
}
end
diff --git a/lua/mason/ui/components/help/formatter.lua b/lua/mason/ui/components/help/formatter.lua
new file mode 100644
index 00000000..45e83e9b
--- /dev/null
+++ b/lua/mason/ui/components/help/formatter.lua
@@ -0,0 +1,13 @@
+local Ui = require "mason-core.ui"
+local p = require "mason.ui.palette"
+
+---@param state InstallerUiState
+return function(state)
+ return Ui.HlTextNode {
+ { p.none "A code formatter is a tool that reformats code to fit a certain" },
+ { p.none "formatting convention. This usually entails things like adjusting" },
+ { p.none "indentation, breaking long lines into smaller lines, adding or" },
+ { p.none "removing whitespaces. Formatting rules are often included as a" },
+ { p.none "separate configuration file within the project." },
+ }
+end
diff --git a/lua/mason/ui/components/help/init.lua b/lua/mason/ui/components/help/init.lua
index f6c9debb..28ff3e37 100644
--- a/lua/mason/ui/components/help/init.lua
+++ b/lua/mason/ui/components/help/init.lua
@@ -6,6 +6,8 @@ local log = require "mason-core.log"
local LSPHelp = require "mason.ui.components.help.lsp"
local DAPHelp = require "mason.ui.components.help.dap"
+local LinterHelp = require "mason.ui.components.help.linter"
+local FormatterHelp = require "mason.ui.components.help.formatter"
---@param state InstallerUiState
local function Ship(state)
@@ -140,6 +142,16 @@ return function(state)
DAPHelp(state),
Ui.EmptyLine(),
}
+ elseif state.view.current == "Linter" then
+ heading = Ui.Node {
+ LinterHelp(state),
+ Ui.EmptyLine(),
+ }
+ elseif state.view.current == "Formatter" then
+ heading = Ui.Node {
+ FormatterHelp(state),
+ Ui.EmptyLine(),
+ }
end
return Ui.CascadingStyleNode({ "INDENT" }, {
diff --git a/lua/mason/ui/components/help/linter.lua b/lua/mason/ui/components/help/linter.lua
new file mode 100644
index 00000000..d0809de3
--- /dev/null
+++ b/lua/mason/ui/components/help/linter.lua
@@ -0,0 +1,13 @@
+local Ui = require "mason-core.ui"
+local p = require "mason.ui.palette"
+
+---@param state InstallerUiState
+return function(state)
+ return Ui.HlTextNode {
+ { p.none "A linter is a static code analysis tool used to provide diagnostics around" },
+ { p.none "programming errors, bugs, stylistic errors and suspicious constructs." },
+ { p.none "Linters can be executed as a standalone program in a terminal, where it" },
+ { p.none "usually expects one or more input files to lint. There are also Neovim plugins" },
+ { p.none "that integrate these diagnostics directly inside the editor, for a richer experience." },
+ }
+end
--
cgit v1.3.1