diff --git a/init.lua b/init.lua index bc81dc4..90e566d 100644 --- a/init.lua +++ b/init.lua @@ -25,10 +25,12 @@ local lazyOptions = { -- argument, the path to lazy.nvim as downloaded by nix, or nil, before the normal arguments. require('nixCatsUtils.lazyCat').setup(nixCats.pawsible { 'allPlugins', 'start', 'lazy.nvim' }, { { 'LazyVim/LazyVim', import = 'lazyvim.plugins' }, + -- disable mason.nvim while using nix -- precompiled binaries do not agree with nixos, and we can just make nix install this stuff for us. { 'williamboman/mason-lspconfig.nvim', enabled = require('nixCatsUtils').lazyAdd(true, false) }, { 'williamboman/mason.nvim', enabled = require('nixCatsUtils').lazyAdd(true, false) }, + { 'nvim-treesitter/nvim-treesitter', build = require('nixCatsUtils').lazyAdd ':TSUpdate', @@ -40,6 +42,7 @@ require('nixCatsUtils.lazyCat').setup(nixCats.pawsible { 'allPlugins', 'start', auto_install = require('nixCatsUtils').lazyAdd(true, false), }, }, + { 'folke/lazydev.nvim', ft = 'lua', @@ -50,6 +53,10 @@ require('nixCatsUtils.lazyCat').setup(nixCats.pawsible { 'allPlugins', 'start', }, }, }, + + -- extras + { import = 'lazyvim.plugins.extras.lang.nix' }, + -- import/override with your plugins { import = 'plugins' }, }, lazyOptions) diff --git a/lua/plugins/conform-nvim.lua b/lua/plugins/conform-nvim.lua new file mode 100644 index 0000000..10ff330 --- /dev/null +++ b/lua/plugins/conform-nvim.lua @@ -0,0 +1,12 @@ +return { + { + 'stevearc/conform.nvim', + + ---@class ConformOpts + opts = { + formatters_by_ft = { + nix = { 'alejandra' }, + }, + }, + }, +} diff --git a/lua/plugins/nvim-lspconfig.lua b/lua/plugins/nvim-lspconfig.lua new file mode 100644 index 0000000..e631186 --- /dev/null +++ b/lua/plugins/nvim-lspconfig.lua @@ -0,0 +1,19 @@ +return { + { + 'neovim/nvim-lspconfig', + opts = { + servers = { + nil_ls = { + settings = { + ['nil'] = { + flake = { + autoArchive = true, + autoEvalInputs = true, + }, + }, + }, + }, + }, + }, + }, +}