Giter Site home page Giter Site logo

mason-nvim-lint's Introduction

mason-nvim-lint

mason-nvim-lint is a Neovim plugin that closes a gap between mason.nvim and nvim-lint, it allows install linters configured in nvim-lint.

Requirements

Installation

{
    "williamboman/mason.nvim",
    "mfussenegger/nvim-lint",
    "rshkarin/mason-nvim-lint",
}
use {
    "williamboman/mason.nvim",
    "mfussenegger/nvim-lint",
    "rshkarin/mason-nvim-lint",
}

Setup

It's crucial to setup plugins in the following order:

  1. mason.nvim
  2. nvim-lint
  3. mason-nvim-lint

Otherwise, mason-nvim-lint will not have enough information about configured linters and access to the mason's registry.

To learn about the available settings and configurations, please refer the Configuration section.

Configuration

You can configure the behavior of mason-nvim-lint by passing the configuration during the calling of the setup() function. All available settings are provided in default configuration section.

Example:

require("mason-nvim-lint").setup()

Default configuration

local DEFAULT_SETTINGS = {
    -- A list of linters to automatically install if they're not already installed. Example: { "eslint_d", "revive" }
    -- This setting has no relation with the `automatic_installation` setting.
    -- Names of linters should be taken from the mason's registry.
    ---@type string[]
    ensure_installed = {},

    -- Whether linters that are set up (via nvim-lint) should be automatically installed if they're not already installed.
    -- It tries to find the specified linters in the mason's registry to proceed with installation.
    -- This setting has no relation with the `ensure_installed` setting.
    ---@type boolean
    automatic_installation = true,

    -- Disables warning notifications about misconfigurations such as invalid linter entries and incorrect plugin load order.
    quiet_mode = false,
}

Basic Customization

Using this configuration, only linters specified in ensure_installed will be installed, ones specified in nvim-lint will be ignored. NOTE: The linters in ensure_installed should be written in the format of the mason's registry (https://mason-registry.dev/).

require ('mason-nvim-lint').setup({
    ensure_installed = {'eslint_d', 'revive'},
})

Copyright

This project relies heavily on mason-lspconfig.nvim.

mason-nvim-lint's People

Contributors

rshkarin avatar etiennecollin avatar catgoose avatar ddean-dev avatar dudicoco avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.