forked from ayamir/nvimdots
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60ef0e1
commit 9aaddc3
Showing
7 changed files
with
168 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
return { | ||
cmd = { "texlab" }, | ||
filetypes = { "tex", "plaintex", "bib" }, | ||
settings = { | ||
{ | ||
texlab = { | ||
auxDirectory = ".", | ||
bibtexFormatter = "texlab", | ||
build = { | ||
args = { "-pdf", "-interaction=nonstopmode", "-synctex=1", "%f" }, | ||
executable = "latexmk", | ||
forwardSearchAfter = false, | ||
onSave = false, | ||
}, | ||
chktex = { | ||
onEdit = false, | ||
onOpenAndSave = false, | ||
}, | ||
diagnosticsDelay = 300, | ||
formatterLineLength = 80, | ||
forwardSearch = { | ||
args = {}, | ||
}, | ||
latexFormatter = "latexindent", | ||
latexindent = { | ||
modifyLineBreaks = false, | ||
}, | ||
}, | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,48 @@ | ||
local null_ls = require("null-ls") | ||
local btns = null_ls.builtins | ||
local exception = require("user.configs.exception") | ||
local handlers = { | ||
actionlint = function() | ||
null_ls.register(btns.diagnostics.actionlint.with({ | ||
condition = function() | ||
return vim.fn.fnamemodify(vim.fn.expand("%:p:h"), ":t") == "workflows" | ||
end, | ||
})) | ||
end, | ||
} | ||
|
||
if not exception.is_nixos() then | ||
for k, setup in pairs(exception.null_ls) do | ||
handlers[k] = null_ls.register(setup()) | ||
return function() | ||
local null_ls = require("null-ls") | ||
local btns = null_ls.builtins | ||
local exception = require("user.configs.exception") | ||
local handlers = { | ||
actionlint = function() | ||
null_ls.register(btns.diagnostics.actionlint.with({ | ||
condition = function() | ||
return vim.fn.fnamemodify(vim.fn.expand("%:p:h"), ":t") == "workflows" | ||
end, | ||
})) | ||
end, | ||
prettier = function() | ||
null_ls.register(btns.formatting.prettier.with({ | ||
-- filetypes = { "markdown", "txt", "tex" }, | ||
condition = function(utils) | ||
if | ||
utils.root_has_file({ | ||
".textlintrc", | ||
".textlintrc.js", | ||
".textlintrc.json", | ||
".textlintrc.yml", | ||
".textlintrc.yaml", | ||
}) | ||
then | ||
return false | ||
end | ||
end, | ||
})) | ||
end, | ||
} | ||
if exception.is_nixos() then | ||
-- for tool, _ in pairs(exception.null_ls()) do | ||
-- handlers[tool] = function() end | ||
-- end | ||
else | ||
for tool, setups in pairs(exception.null_ls()) do | ||
handlers[tool] = function() | ||
for _, setup in pairs(setups) do | ||
null_ls.register(setup) | ||
end | ||
end | ||
end | ||
end | ||
return { | ||
handlers = handlers, | ||
} | ||
end | ||
|
||
return { | ||
handlers = function() | ||
return handlers | ||
end, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
local null_ls = require("null-ls") | ||
local btns = null_ls.builtins | ||
local sources = { | ||
btns.diagnostics.statix, | ||
} | ||
local exception = require("user.configs.exception") | ||
if exception.is_nixos() then | ||
for _, setup in pairs(exception.null_ls) do | ||
table.insert(sources, setup()) | ||
return function() | ||
local null_ls = require("null-ls") | ||
local btns = null_ls.builtins | ||
local sources = { | ||
btns.diagnostics.statix, | ||
} | ||
local exception = require("user.configs.exception") | ||
if exception.is_nixos() then | ||
for _, setups in pairs(exception.null_ls()) do | ||
for _, setup in pairs(setups) do | ||
table.insert(sources, setup) | ||
end | ||
end | ||
end | ||
return { | ||
sources = sources, | ||
debug = true, | ||
} | ||
end | ||
|
||
return { | ||
sources = sources, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
return { | ||
patterns = { "*.tex", "default.yaml", ".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json" }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters