|
|
|
@ -1,17 +1,15 @@
|
|
|
|
|
-- NOTE: this just gives nixCats global command a default value
|
|
|
|
|
-- so that it doesnt throw an error if you didnt install via nix.
|
|
|
|
|
-- usage of both this setup and the nixCats command is optional,
|
|
|
|
|
-- but it is very useful for passing info from nix to lua so you will likely use it at least once.
|
|
|
|
|
require('nixCatsUtils').setup {
|
|
|
|
|
require('nixCatsUtils').setup({
|
|
|
|
|
non_nix_value = true,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
-- NOTE: You might want to move the lazy-lock.json file
|
|
|
|
|
local function getlockfilepath()
|
|
|
|
|
if require('nixCatsUtils').isNixCats and type(nixCats.settings.unwrappedCfgPath) == 'string' then
|
|
|
|
|
if
|
|
|
|
|
require('nixCatsUtils').isNixCats
|
|
|
|
|
and type(nixCats.settings.unwrappedCfgPath) == 'string'
|
|
|
|
|
then
|
|
|
|
|
return nixCats.settings.unwrappedCfgPath .. '/lazy-lock.json'
|
|
|
|
|
else
|
|
|
|
|
return vim.fn.stdpath 'config' .. '/lazy-lock.json'
|
|
|
|
|
return vim.fn.stdpath('config') .. '/lazy-lock.json'
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
local lazyOptions = {
|
|
|
|
@ -21,93 +19,107 @@ local lazyOptions = {
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
-- NOTE: this the lazy wrapper. Use it like require('lazy').setup() but with an
|
|
|
|
|
-- extra 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' },
|
|
|
|
|
|
|
|
|
|
require('nixCatsUtils.lazyCat').setup(
|
|
|
|
|
nixCats.pawsible({ 'allPlugins', 'start', 'lazy.nvim' }),
|
|
|
|
|
{
|
|
|
|
|
'folke/lazydev.nvim',
|
|
|
|
|
ft = 'lua',
|
|
|
|
|
opts = {
|
|
|
|
|
library = {
|
|
|
|
|
-- Adds type hints for nixCats global, but LazyDev is just nice in
|
|
|
|
|
-- general.
|
|
|
|
|
{ path = (nixCats.nixCatsPath or '') .. '/lua', words = { 'nixCats' } },
|
|
|
|
|
{ 'LazyVim/LazyVim', import = 'lazyvim.plugins' },
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
'folke/lazydev.nvim',
|
|
|
|
|
ft = 'lua',
|
|
|
|
|
opts = {
|
|
|
|
|
library = {
|
|
|
|
|
{
|
|
|
|
|
path = (nixCats.nixCatsPath or '') .. '/lua',
|
|
|
|
|
words = { 'nixCats' },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
-- Extras.
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.coding.luasnip' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.coding.mini-comment' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.coding.mini-surround' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.coding.neogen' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.coding.yanky' },
|
|
|
|
|
-- Extras.
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.coding.luasnip' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.coding.mini-comment' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.coding.mini-surround' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.coding.neogen' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.coding.yanky' },
|
|
|
|
|
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.editor.aerial' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.editor.dial' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.editor.navic' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.editor.neo-tree' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.editor.refactoring' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.editor.aerial' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.editor.dial' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.editor.navic' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.editor.neo-tree' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.editor.refactoring' },
|
|
|
|
|
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.formatting.biome' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.formatting.prettier' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.formatting.biome' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.formatting.prettier' },
|
|
|
|
|
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.docker' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.git' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.go' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.helm' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.json' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.markdown' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.nix' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.nushell' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.php' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.python' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.ruby' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.sql' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.tailwind' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.terraform' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.toml' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.typescript' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.vue' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.yaml' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.docker' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.git' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.go' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.helm' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.json' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.markdown' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.nix' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.nushell' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.php' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.python' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.ruby' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.sql' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.tailwind' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.terraform' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.toml' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.typescript' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.vue' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.lang.yaml' },
|
|
|
|
|
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.linting.eslint' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.linting.eslint' },
|
|
|
|
|
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.test.core' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.test.core' },
|
|
|
|
|
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.ui.mini-animate' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.ui.treesitter-context' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.ui.mini-animate' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.ui.treesitter-context' },
|
|
|
|
|
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.util.dot' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.util.mini-hipatterns' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.util.octo' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.util.project' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.util.rest' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.util.dot' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.util.mini-hipatterns' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.util.octo' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.util.project' },
|
|
|
|
|
{ import = 'lazyvim.plugins.extras.util.rest' },
|
|
|
|
|
|
|
|
|
|
-- These need to be after extras to prevent extras from overwriting them.
|
|
|
|
|
-- These need to be after extras to prevent extras from overwriting them.
|
|
|
|
|
|
|
|
|
|
-- 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',
|
|
|
|
|
opts_extend = require('nixCatsUtils').lazyAdd(nil, false),
|
|
|
|
|
opts = {
|
|
|
|
|
-- Nix already ensured they were installed, and we would need to change
|
|
|
|
|
-- the parser_install_dir if we wanted to use it instead.
|
|
|
|
|
-- So we just disable install and do it via nix.
|
|
|
|
|
ensure_installed = require('nixCatsUtils').lazyAdd({ 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc' }, false),
|
|
|
|
|
auto_install = require('nixCatsUtils').lazyAdd(true, false),
|
|
|
|
|
-- Disable mason.nvim while using Nix.
|
|
|
|
|
{
|
|
|
|
|
'williamboman/mason-lspconfig.nvim',
|
|
|
|
|
enabled = require('nixCatsUtils').lazyAdd(true, false),
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
'williamboman/mason.nvim',
|
|
|
|
|
enabled = require('nixCatsUtils').lazyAdd(true, false),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
-- import/override with your plugins
|
|
|
|
|
{ import = 'plugins' },
|
|
|
|
|
}, lazyOptions)
|
|
|
|
|
{
|
|
|
|
|
'nvim-treesitter/nvim-treesitter',
|
|
|
|
|
build = require('nixCatsUtils').lazyAdd(':TSUpdate'),
|
|
|
|
|
opts_extend = require('nixCatsUtils').lazyAdd(nil, false),
|
|
|
|
|
opts = {
|
|
|
|
|
-- Disable parser installation while using Nix.
|
|
|
|
|
ensure_installed = require('nixCatsUtils').lazyAdd({
|
|
|
|
|
'bash',
|
|
|
|
|
'c',
|
|
|
|
|
'diff',
|
|
|
|
|
'html',
|
|
|
|
|
'lua',
|
|
|
|
|
'luadoc',
|
|
|
|
|
'markdown',
|
|
|
|
|
'vim',
|
|
|
|
|
'vimdoc',
|
|
|
|
|
}, false),
|
|
|
|
|
auto_install = require('nixCatsUtils').lazyAdd(true, false),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
-- import/override with your plugins
|
|
|
|
|
{ import = 'plugins' },
|
|
|
|
|
},
|
|
|
|
|
lazyOptions
|
|
|
|
|
)
|
|
|
|
|