Where does the nixCats lua function come from? #339
-
-- NOTE: various, non-plugin config
require('myLuaConf.opts_and_keys')
-- NOTE: register an extra lze handler with the spec_field 'for_cat'
-- that makes enabling an lze spec for a category slightly nicer
require("lze").register_handlers(require('nixCatsUtils.lzUtils').for_cat)
-- NOTE: Register another one from lzextras. This one makes it so that
-- you can set up lsps within lze specs,
-- and trigger lspconfig setup hooks only on the correct filetypes
require('lze').register_handlers(require('lzextras').lsp)
-- demonstrated in ./LSPs/init.lua
-- NOTE: general plugins
require("myLuaConf.plugins")
-- NOTE: obviously, more plugins, but more organized by what they do below
require("myLuaConf.LSPs")
-- NOTE: we even ask nixCats if we included our debug stuff in this setup! (we didnt)
-- But we have a good base setup here as an example anyway!
if nixCats('debug') then
require('myLuaConf.debug')
end
-- NOTE: we included these though! Or, at least, the category is enabled.
-- these contain nvim-lint and conform setups.
if nixCats('lint') then
require('myLuaConf.lint')
end
if nixCats('format') then
require('myLuaConf.format')
end
-- NOTE: I didnt actually include any linters or formatters in this configuration,
-- but it is enough to serve as an example.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
It gets generated from the information in your nix file, namely your packageDefinitions Its just some tables written to a lua file via nix on build. Its where you get info about your nix from within lua. If you meant "where in the code of nixCats is the nixCats plugin defined" here is the nix side of it mostly and the lua side minus your info from nix here. It gets filled in with your info and built into a plugin. |
Beta Was this translation helpful? Give feedback.
:NixCats nixCatsPathwill give you the path to it in the store if you want to go look at it.:h nixCatsfor docs on specifically the nixCats lua plugin.It gets generated from the information in your nix file, namely your packageDefinitions
Its just some tables written to a lua file via nix on build. Its where you get info about your nix from within lua.
If you meant "where in the code of nixCats is the nixCats plugin defined" here is the nix side of it mostly and the lua side minus your info from nix here. It gets filled in with your info and built into a plugin.