GithubHelp home page GithubHelp logo

gbprod / none-ls-luacheck.nvim Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 4 KB

Luacheck diagnostics source for none-ls.nvim

License: Do What The F*ck You Want To Public License

Lua 100.00%
lua luacheck neovim neovim-plugin none-ls null-ls nvim nvim-plugin none-ls-sources null-ls-sources

none-ls-luacheck.nvim's Issues

Why not having all external sources in a single repo

@gbprod suggestion:

  • It's ok if not all external sources live in none-ls-extras.nvim.
  • But I would suggest having all the external sources authored by you in a single repo.

Practical example

Let's say currently, I want to load all your external sources using none-ls-autoload.nvim.

{
  "zeioth/none-ls-autoload.nvim",
  event = "BufEnter",
  dependencies = {
    "williamboman/mason.nvim",
    "nvimtools/none-ls-extras.nvim", -- To install external sources from a repo.
    "gbprod/none-ls-shellcheck.nvim",
    "gbprod/none-ls-luacheck.nvim",
    "gbprod/none-ls-php.nvim",
    "gbprod/none-ls-psalm.nvim",
    "gbprod/none-ls-ecs.nvim"
  },
  opts = {
    external_sources = { -- To indicate where to find a external source.
      -- diagnostics
      'none-ls-shellcheck.diagnostics',
      'none-ls-luacheck.diagnostics.luacheck',
      'none-ls-php.diagnostics.php',
      'none-ls-psalm.diagnostics',

      -- formatting
      'none-ls-ecs.formatting',
    },
  },
},

We can observe:

  • Several dependencies had to be installed (which is verbose).
  • The external source path is different on each of your sources, which can lead to confusion.
  • source paths don't currently follow the none-ls path convention of package_name.method.mason_package_name.

Respecting path naming conventions

Instead, the directory structure should be conventional like this

'gbprob-none-ls.diagnostics.shellcheck',
'gbprob-none-ls.diagnostics.luacheck',
'gbprob-none-ls.diagnostics.php,
'gbprob-none-ls.diagnostics.psalm',

-- formatting
'gbprob-external-sources.formatting.ecs',

Otherwise none-ls-autoload (or any other plugin) won't be able to load it.

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.