style: Remove most comments

This commit is contained in:
punkfairie 2025-03-15 17:53:57 -07:00
parent fbb792f884
commit 98ef1506d1
Signed by: punkfairie
GPG key ID: B3C5488E9A1A7CA6

View file

@ -1,17 +1,15 @@
-- NOTE: this just gives nixCats global command a default value require('nixCatsUtils').setup({
-- 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 {
non_nix_value = true, non_nix_value = true,
} })
-- NOTE: You might want to move the lazy-lock.json file
local function getlockfilepath() 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' return nixCats.settings.unwrappedCfgPath .. '/lazy-lock.json'
else else
return vim.fn.stdpath 'config' .. '/lazy-lock.json' return vim.fn.stdpath('config') .. '/lazy-lock.json'
end end
end end
local lazyOptions = { local lazyOptions = {
@ -21,10 +19,9 @@ local lazyOptions = {
}, },
} }
-- NOTE: this the lazy wrapper. Use it like require('lazy').setup() but with an require('nixCatsUtils.lazyCat').setup(
-- extra argument, the path to lazy.nvim as downloaded by nix, or nil, before nixCats.pawsible({ 'allPlugins', 'start', 'lazy.nvim' }),
-- the normal arguments. {
require('nixCatsUtils.lazyCat').setup(nixCats.pawsible { 'allPlugins', 'start', 'lazy.nvim' }, {
{ 'LazyVim/LazyVim', import = 'lazyvim.plugins' }, { 'LazyVim/LazyVim', import = 'lazyvim.plugins' },
{ {
@ -32,9 +29,10 @@ require('nixCatsUtils.lazyCat').setup(nixCats.pawsible { 'allPlugins', 'start',
ft = 'lua', ft = 'lua',
opts = { opts = {
library = { library = {
-- Adds type hints for nixCats global, but LazyDev is just nice in {
-- general. path = (nixCats.nixCatsPath or '') .. '/lua',
{ path = (nixCats.nixCatsPath or '') .. '/lua', words = { 'nixCats' } }, words = { 'nixCats' },
},
}, },
}, },
}, },
@ -89,25 +87,39 @@ require('nixCatsUtils.lazyCat').setup(nixCats.pawsible { 'allPlugins', 'start',
-- 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. -- 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',
{ 'williamboman/mason-lspconfig.nvim', enabled = require('nixCatsUtils').lazyAdd(true, false) }, enabled = require('nixCatsUtils').lazyAdd(true, false),
{ 'williamboman/mason.nvim', enabled = require('nixCatsUtils').lazyAdd(true, false) }, },
{
'williamboman/mason.nvim',
enabled = require('nixCatsUtils').lazyAdd(true, false),
},
{ {
'nvim-treesitter/nvim-treesitter', 'nvim-treesitter/nvim-treesitter',
build = require('nixCatsUtils').lazyAdd ':TSUpdate', build = require('nixCatsUtils').lazyAdd(':TSUpdate'),
opts_extend = require('nixCatsUtils').lazyAdd(nil, false), opts_extend = require('nixCatsUtils').lazyAdd(nil, false),
opts = { opts = {
-- Nix already ensured they were installed, and we would need to change -- Disable parser installation while using Nix.
-- the parser_install_dir if we wanted to use it instead. ensure_installed = require('nixCatsUtils').lazyAdd({
-- So we just disable install and do it via nix. 'bash',
ensure_installed = require('nixCatsUtils').lazyAdd({ 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc' }, false), 'c',
'diff',
'html',
'lua',
'luadoc',
'markdown',
'vim',
'vimdoc',
}, false),
auto_install = require('nixCatsUtils').lazyAdd(true, false), auto_install = require('nixCatsUtils').lazyAdd(true, false),
}, },
}, },
-- import/override with your plugins -- import/override with your plugins
{ import = 'plugins' }, { import = 'plugins' },
}, lazyOptions) },
lazyOptions
)