From c92cc60866930a330ddbf5e92996b46a1dab23ee Mon Sep 17 00:00:00 2001 From: William Boman Date: Sun, 24 Jul 2022 15:05:22 +0200 Subject: stable branch release --- .github/workflows/check-generated-code-state.yml | 2 +- .github/workflows/stylua.yml | 2 +- .github/workflows/tests.yml | 2 +- README.md | 18 +++++++----------- doc/mason.txt | 2 +- lua/mason/ui/components/header.lua | 7 ------- lua/mason/ui/components/help/dap.lua | 7 +++++++ lua/mason/ui/components/help/formatter.lua | 13 +++++++++++++ lua/mason/ui/components/help/init.lua | 12 ++++++++++++ lua/mason/ui/components/help/linter.lua | 13 +++++++++++++ 10 files changed, 56 insertions(+), 22 deletions(-) create mode 100644 lua/mason/ui/components/help/formatter.lua create mode 100644 lua/mason/ui/components/help/linter.lua 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: diff --git a/README.md b/README.md index c28d7350..7f620332 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![GitHub CI](https://github.com/williamboman/mason.nvim/workflows/Tests/badge.svg)](https://github.com/williamboman/mason.nvim/actions?query=workflow%3ATests+branch%3Aalpha+event%3Apush) +[![GitHub CI](https://github.com/williamboman/mason.nvim/workflows/Tests/badge.svg)](https://github.com/williamboman/mason.nvim/actions?query=workflow%3ATests+branch%3Amain+event%3Apush) ![Platforms](https://img.shields.io/badge/platform-linux%20macOS%20windows-blue) ![Repository size](https://img.shields.io/github/repo-size/williamboman/mason.nvim) [![Sponsors](https://img.shields.io/github/sponsors/williamboman?style=flat-square)](https://github.com/sponsors/williamboman) @@ -10,11 +10,6 @@ Easily install and manage LSP servers, DAP servers, linters, and formatters.

-

- 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 -| | | | | -| :--------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: | -| | | | | +| | | | +| :--------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------: | +| Main window | | Language filter | +| LSP server configuration schema | Checking for new versions | Help window | # 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