mirror of
https://github.com/dwinkler1/nvimConfig.git
synced 2026-05-22 20:13:32 -04:00
load packages only if installed
This commit is contained in:
parent
74600519a5
commit
d23c7f6f51
4 changed files with 92 additions and 82 deletions
|
|
@ -390,23 +390,25 @@ end)
|
|||
|
||||
-- zk
|
||||
now_if_args(function()
|
||||
require("zk").setup({
|
||||
picker = "minipick",
|
||||
lsp = {
|
||||
-- `config` is passed to `vim.lsp.start_client(config)`
|
||||
config = {
|
||||
cmd = { "zk", "lsp" },
|
||||
name = "zk",
|
||||
-- on_attach = ...
|
||||
-- etc, see `:h vim.lsp.start_client()`
|
||||
},
|
||||
if nix.get_cat("markdown", false) then
|
||||
require("zk").setup({
|
||||
picker = "minipick",
|
||||
lsp = {
|
||||
-- `config` is passed to `vim.lsp.start_client(config)`
|
||||
config = {
|
||||
cmd = { "zk", "lsp" },
|
||||
name = "zk",
|
||||
-- on_attach = ...
|
||||
-- etc, see `:h vim.lsp.start_client()`
|
||||
},
|
||||
|
||||
-- automatically attach buffers in a zk notebook that match the given filetypes
|
||||
auto_attach = {
|
||||
enabled = true,
|
||||
filetypes = { "markdown" },
|
||||
},
|
||||
-- automatically attach buffers in a zk notebook that match the given filetypes
|
||||
auto_attach = {
|
||||
enabled = true,
|
||||
filetypes = { "markdown" },
|
||||
},
|
||||
|
||||
},
|
||||
})
|
||||
},
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
|
|
|||
|
|
@ -71,22 +71,24 @@ end)
|
|||
now(function()
|
||||
vim.treesitter.language.register("markdown", { "quarto", "rmd" })
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "quarto" },
|
||||
callback = function()
|
||||
require("otter").activate()
|
||||
end,
|
||||
})
|
||||
if nix.get_cat({"r", "markdown"}, false) then
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "quarto" },
|
||||
callback = function()
|
||||
require("otter").activate()
|
||||
end,
|
||||
})
|
||||
|
||||
require("otter").setup({
|
||||
lsp = {
|
||||
diagnostic_update_events = { "BufWritePost", "InsertLeave" },
|
||||
},
|
||||
buffers = {
|
||||
set_filetype = true,
|
||||
write_to_disk = true,
|
||||
},
|
||||
})
|
||||
require("otter").setup({
|
||||
lsp = {
|
||||
diagnostic_update_events = { "BufWritePost", "InsertLeave" },
|
||||
},
|
||||
buffers = {
|
||||
set_filetype = true,
|
||||
write_to_disk = true,
|
||||
},
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
||||
later(function()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue