feat: nil_ls setup
This commit is contained in:
parent
8a48c56206
commit
fe559c2214
3 changed files with 38 additions and 0 deletions
7
init.lua
7
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)
|
||||
|
|
12
lua/plugins/conform-nvim.lua
Normal file
12
lua/plugins/conform-nvim.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
return {
|
||||
{
|
||||
'stevearc/conform.nvim',
|
||||
|
||||
---@class ConformOpts
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
nix = { 'alejandra' },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
19
lua/plugins/nvim-lspconfig.lua
Normal file
19
lua/plugins/nvim-lspconfig.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
return {
|
||||
{
|
||||
'neovim/nvim-lspconfig',
|
||||
opts = {
|
||||
servers = {
|
||||
nil_ls = {
|
||||
settings = {
|
||||
['nil'] = {
|
||||
flake = {
|
||||
autoArchive = true,
|
||||
autoEvalInputs = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Reference in a new issue