Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NvChad - Vale - fix dated instruction #2116

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 23 additions & 24 deletions docs/books/nvchad/vale_nvchad.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,33 @@ tags:

The [nvim-lint](https://github.com/mfussenegger/nvim-lint) plugin provides support for inserting ==linters== into the editor by correcting code or content for both the syntactic and semantic parts.

To install the plugin, you need to edit the `lua/plugins/init.lua` file by adding the following block of code:

```lua title="plugins.lua"
{
"mfussenegger/nvim-lint",
event = "VeryLazy",
config = function()
require "custom.configs.lint"
To install the *nvim-lint* plugin, simply create a **nvim-lint.lua** file in the `lua/plugins` folder; when the Neovim instance is next started, this will be integrated into the configuration.

The contents of the file are as follows:

```lua title="nvim-lint.lua"
return {
{
"mfussenegger/nvim-lint",
enabled = true,
event = "VeryLazy",
config = function()
require("lint").linters_by_ft = {
markdown = { "markdownlint", "vale" },
yaml = { "yamllint" },
}

vim.api.nvim_create_autocmd({ "BufWritePost" }, {
callback = function()
require("lint").try_lint()
end,
},
```

The plugin has a configuration file to be placed in the `lua/configs` folder. Inside it we find a table ==linters_by_ft== where you can enter the *linters* for the languages used for development.

```lua title="lint.lua"
require("lint").linters_by_ft = {
markdown = { "markdownlint" },
yaml = { "yamllint" },
}

vim.api.nvim_create_autocmd({ "BufWritePost" }, {
callback = function()
require("lint").try_lint()
})
end,
})
},
}
```

This configuration file is set to work with markdown code but can be modified or extended with [those available](https://github.com/mfussenegger/nvim-lint?tab=readme-ov-file#available-linters) on the project site.
This configuration file is set to work with markdown code but can be modified or extended with [those available](https://github.com/mfussenegger/nvim-lint?tab=readme-ov-file#available-linters) on the project site.

Once the changes are complete exit and re-enter NvChad to install the plugin and import the configuration.

Expand Down
Loading