mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-09 06:55:30 +00:00
lib: rewrite toLuaObject, deprecate everything else
This commit is contained in:
parent
83f4a8ebd7
commit
c8734cc4db
4 changed files with 53 additions and 94 deletions
|
|
@ -9,7 +9,7 @@
|
|||
inherit (lib.strings) concatLines concatStringsSep optionalString;
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
inherit (lib.types) listOf str attrsOf;
|
||||
inherit (lib.nvim.lua) listToLuaTable;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
inherit (lib.nvim.dag) entryAfter;
|
||||
|
||||
cfg = config.vim.spellcheck;
|
||||
|
|
@ -152,7 +152,7 @@ in {
|
|||
vim.api.nvim_create_augroup("nvf_autocmds", {clear = false})
|
||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
group = "nvf_autocmds",
|
||||
pattern = ${listToLuaTable cfg.ignoredFiletypes},
|
||||
pattern = ${toLuaObject cfg.ignoredFiletypes},
|
||||
callback = function()
|
||||
vim.opt_local.spell = false
|
||||
end,
|
||||
|
|
|
|||
|
|
@ -11,11 +11,10 @@
|
|||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.nvim.dag) entryAfter;
|
||||
inherit (lib.nvim.lua) expToLua;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
inherit (lib.meta) getExe';
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (pkgs) haskellPackages;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.languages.haskell;
|
||||
|
||||
|
|
@ -120,7 +119,7 @@ in {
|
|||
dap = {
|
||||
cmd = ${
|
||||
if isList cfg.dap.package
|
||||
then expToLua cfg.dap.package
|
||||
then toLuaObject cfg.dap.package
|
||||
else ''{"${cfg.dap.package}/bin/haskell-debug-adapter"}''
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
inherit (lib.lists) isList;
|
||||
inherit (lib.types) bool package str listOf either enum;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
inherit (lib.nvim.lua) expToLua;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
inherit (lib.nvim.dag) entryAfter entryAnywhere;
|
||||
|
||||
cfg = config.vim.languages.rust;
|
||||
|
|
@ -153,7 +153,7 @@ in {
|
|||
server = {
|
||||
cmd = ${
|
||||
if isList cfg.lsp.package
|
||||
then expToLua cfg.lsp.package
|
||||
then toLuaObject cfg.lsp.package
|
||||
else ''{"${cfg.lsp.package}/bin/rust-analyzer"}''
|
||||
},
|
||||
default_settings = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue