diff options
| author | William Boman <william@redwill.se> | 2022-07-24 15:05:22 +0200 |
|---|---|---|
| committer | William Boman <william@redwill.se> | 2022-07-24 15:06:55 +0200 |
| commit | c92cc60866930a330ddbf5e92996b46a1dab23ee (patch) | |
| tree | bb3f23da69b05c01fa5b9dc01996cf9f78f37007 | |
| parent | feat: add vale (#121) (diff) | |
| download | mason-c92cc60866930a330ddbf5e92996b46a1dab23ee.tar mason-c92cc60866930a330ddbf5e92996b46a1dab23ee.tar.gz mason-c92cc60866930a330ddbf5e92996b46a1dab23ee.tar.bz2 mason-c92cc60866930a330ddbf5e92996b46a1dab23ee.tar.lz mason-c92cc60866930a330ddbf5e92996b46a1dab23ee.tar.xz mason-c92cc60866930a330ddbf5e92996b46a1dab23ee.tar.zst mason-c92cc60866930a330ddbf5e92996b46a1dab23ee.zip | |
stable branch release
| -rw-r--r-- | .github/workflows/check-generated-code-state.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/stylua.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/tests.yml | 2 | ||||
| -rw-r--r-- | README.md | 18 | ||||
| -rw-r--r-- | doc/mason.txt | 2 | ||||
| -rw-r--r-- | lua/mason/ui/components/header.lua | 7 | ||||
| -rw-r--r-- | lua/mason/ui/components/help/dap.lua | 7 | ||||
| -rw-r--r-- | lua/mason/ui/components/help/formatter.lua | 13 | ||||
| -rw-r--r-- | lua/mason/ui/components/help/init.lua | 12 | ||||
| -rw-r--r-- | lua/mason/ui/components/help/linter.lua | 13 |
10 files changed, 56 insertions, 22 deletions
diff --git a/.github/workflows/check-generated-code-state.yml b/.github/workflows/check-generated-code-state.yml index f3b94fea..99abfe25 100644 --- a/.github/workflows/check-generated-code-state.yml +++ b/.github/workflows/check-generated-code-state.yml @@ -3,7 +3,7 @@ name: Check generated code state on: push: branches: - - "alpha" + - "main" pull_request: jobs: diff --git a/.github/workflows/stylua.yml b/.github/workflows/stylua.yml index 877795de..e28130be 100644 --- a/.github/workflows/stylua.yml +++ b/.github/workflows/stylua.yml @@ -3,7 +3,7 @@ name: Stylua check on: push: branches: - - "alpha" + - "main" pull_request: jobs: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8636dbb6..68c2e219 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,7 +3,7 @@ name: Tests on: push: branches: - - "alpha" + - "main" pull_request: jobs: @@ -1,4 +1,4 @@ -[](https://github.com/williamboman/mason.nvim/actions?query=workflow%3ATests+branch%3Aalpha+event%3Apush) +[](https://github.com/williamboman/mason.nvim/actions?query=workflow%3ATests+branch%3Amain+event%3Apush)   [](https://github.com/sponsors/williamboman) @@ -10,11 +10,6 @@ Easily install and manage LSP servers, DAP servers, linters, and formatters. </p> -<p align="center"> - <em>Still a WIP - things remain subject to change and documentation is somewhat lacking.</em> - <em><a href="https://github.com/williamboman/mason.nvim/discussions/new?category=ideas">Early feedback is very much appreciated</a></em> -</p> - # Table of Contents - [Introduction](#introduction) @@ -38,9 +33,10 @@ etc.) as well as other 3rd party plugins. ## Screenshots -| | | | | -| :--------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: | -| <img src="https://user-images.githubusercontent.com/6705160/177617680-d62caf26-f253-4ace-ab57-4b590595adca.png"> | <img src="https://user-images.githubusercontent.com/6705160/177617684-6bb4c13f-1235-4ac9-829e-120b06f7437b.png"> | <img src="https://user-images.githubusercontent.com/6705160/177617688-8f9ba225-00c8-495c-9c4c-b74240d6f280.png"> | <img src="https://user-images.githubusercontent.com/6705160/177617692-02c6ddde-a97e-42b4-bca4-4f4caf45d569.png"> | +| | | | +| :--------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: | +| <img alt="Main window" src="https://user-images.githubusercontent.com/6705160/177617680-d62caf26-f253-4ace-ab57-4b590595adca.png"> | <img src="https://user-images.githubusercontent.com/6705160/177617684-6bb4c13f-1235-4ac9-829e-120b06f7437b.png"> | <img alt="Language filter" src="https://user-images.githubusercontent.com/6705160/177617688-8f9ba225-00c8-495c-9c4c-b74240d6f280.png"> | +| <img alt="LSP server configuration schema" src="https://user-images.githubusercontent.com/6705160/177617692-02c6ddde-a97e-42b4-bca4-4f4caf45d569.png"> | <img alt="Checking for new versions" src="https://user-images.githubusercontent.com/6705160/180648183-69077d10-8795-4da6-ba4d-57ecf0cb25c9.png"> | <img alt="Help window" src="https://user-images.githubusercontent.com/6705160/180648292-136a0888-0fb6-4226-aa29-53bd3ffed400.png"> | # 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 |
