mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 08:53:33 +02:00
feat(lang): add nix language support (#2956)
In the future we can add: - dap / debugger support, if this is ever possible or needed. - extend neotest, if this is ever needed, for most people I suspect not needed. - linting, if this is ever needed. - ~~maybe enhance nvim-cmp behavior with nixpkgs, rust lang extension crates.nvim does smt with nvim-cmp, other language extensions don't.~~ I think its already good to merge this PR, we can add these enhancements later, if they are ever needed. --------- Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
This commit is contained in:
parent
4ef42b4578
commit
9eae3e015a
1 changed files with 30 additions and 0 deletions
30
lua/lazyvim/plugins/extras/lang/nix.lua
Normal file
30
lua/lazyvim/plugins/extras/lang/nix.lua
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
return {
|
||||||
|
recommended = {
|
||||||
|
ft = "nix",
|
||||||
|
root = "flake.nix",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
opts = function(_, opts)
|
||||||
|
opts.ensure_installed = opts.ensure_installed or {}
|
||||||
|
vim.list_extend(opts.ensure_installed, { "nix" })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
opts = {
|
||||||
|
servers = {
|
||||||
|
nil_ls = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
optional = true,
|
||||||
|
opts = {
|
||||||
|
formatters_by_ft = {
|
||||||
|
nix = { "nixfmt" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue