Files
LazyVim/lua/lazyvim/plugins/extras/lang/nix.lua
Izel Nakri | izelnakri.eth 9eae3e015a 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>
2024-06-05 23:44:43 +02:00

31 lines
523 B
Lua

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" },
},
},
},
}