Compare commits
No commits in common. "quarto" and "main" have entirely different histories.
|
@ -102,10 +102,6 @@ I won't provide links for each of these plugins as they are easily to be found.
|
|||
- `rainbow-csv.nvim` to manage CSV files.
|
||||
- `venv-selector.nvim` to ease python virtual env.
|
||||
- `vim-grammalecte` to get a good grammar checker for French.
|
||||
- Quarto:
|
||||
- `nvim-quarto` to add quarto environment configuration.
|
||||
- `otter` for the embedded code completion.
|
||||
- `vim-slime` for the embedded code execution.
|
||||
|
||||
<!-- references -->
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
|
@ -17,8 +17,6 @@ return {
|
|||
-- Import lspconfig
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
local util = require("lspconfig.util")
|
||||
|
||||
-- Import mason-tool-installer
|
||||
local mason_tool_installer = require("mason-tool-installer")
|
||||
|
||||
|
@ -53,7 +51,6 @@ return {
|
|||
"html",
|
||||
"jsonls",
|
||||
"lua_ls",
|
||||
"marksman",
|
||||
"pylsp",
|
||||
"yamlls",
|
||||
},
|
||||
|
@ -108,7 +105,7 @@ return {
|
|||
end,
|
||||
|
||||
jsonls = function()
|
||||
lspconfig.jsonls.setup({
|
||||
lspconfig.lua_ls.setup({
|
||||
settings = {
|
||||
json = {
|
||||
schemas = require("schemastore").json.schemas(),
|
||||
|
@ -116,22 +113,6 @@ return {
|
|||
}
|
||||
}
|
||||
})
|
||||
end,
|
||||
|
||||
marksman = function()
|
||||
lspconfig.marksman.setup({
|
||||
setting = {
|
||||
filetypes = {
|
||||
"markdown",
|
||||
"quarto",
|
||||
},
|
||||
root_dir = util.root_pattern(
|
||||
'.git',
|
||||
'.marksman.toml',
|
||||
'_quarto.yml'
|
||||
),
|
||||
}
|
||||
})
|
||||
end
|
||||
},
|
||||
})
|
||||
|
|
|
@ -28,9 +28,6 @@ return {
|
|||
"hrsh7th/cmp-emoji",
|
||||
-- vs-code pictrograms
|
||||
"onsails/lspkind.nvim",
|
||||
|
||||
-- Completion source for code emmbedded in other documents
|
||||
"jmbuh/otter.nvim",
|
||||
},
|
||||
|
||||
-- Configure nvim-cmp
|
||||
|
@ -43,17 +40,16 @@ return {
|
|||
|
||||
luasnip.config.setup {
|
||||
-- Extend markdown snippets to pandoc filetype
|
||||
-- https://github.com/L3MON4D3/LuaSnip/issues/132#issuecomment-1101731222
|
||||
-- https://github.com/L3MON4D3/LuaSnip/issues/132#issuecomment-1101710309
|
||||
snippets = {
|
||||
markdown = {},
|
||||
},
|
||||
luasnip.filetype_extend("pandoc", {"markdown"}),
|
||||
luasnip.filetype_extend("quarto", {"markdown"}),
|
||||
}
|
||||
|
||||
-- Load snippets from ~/.config/nvim/my_snippets/
|
||||
require("luasnip.loaders.from_lua").lazy_load(
|
||||
{ paths = "~/.config/nvim/my_snippets/" }
|
||||
{paths = "~/.config/nvim/my_snippets/"}
|
||||
)
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
-- Install and configure `quarto-nvim`
|
||||
-- https://github.com/quarto-dev/quarto-nvim
|
||||
|
||||
return {
|
||||
{
|
||||
"quarto-dev/quarto-nvim",
|
||||
lazy = true,
|
||||
ft = {
|
||||
"quarto",
|
||||
},
|
||||
dependencies = {
|
||||
"jmbuhr/otter.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
},
|
||||
}
|
|
@ -39,7 +39,6 @@ return {
|
|||
|
||||
-- Configure treesitter
|
||||
config = function()
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
local config = require("nvim-treesitter.configs")
|
||||
|
||||
config.setup({
|
||||
|
@ -56,28 +55,26 @@ return {
|
|||
-- Installed and configured languages
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"css",
|
||||
"dot",
|
||||
"gitignore",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"julia",
|
||||
"latex",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"mermaid",
|
||||
"norg",
|
||||
"python",
|
||||
"query",
|
||||
"r",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"yaml",
|
||||
},
|
||||
|
||||
-- Empty option, to avoid warning
|
||||
modules = {},
|
||||
|
||||
-- List of parsers to ignore installing
|
||||
ignore_install = {
|
||||
"markdown",
|
||||
"markdown_inline"
|
||||
},
|
||||
|
||||
-- Do not install parses synchronously
|
||||
sync_install = false,
|
||||
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
-- Install and configure vim-slime
|
||||
-- https://github.com/jpalardy/vim-slime
|
||||
|
||||
return {
|
||||
'jpalardy/vim-slime',
|
||||
dev = false,
|
||||
init = function()
|
||||
vim.b['quarto_is_python_chunk'] = false
|
||||
Quarto_is_in_python_chunk = function()
|
||||
require('otter.tools.functions').is_otter_language_context 'python'
|
||||
end
|
||||
|
||||
vim.cmd [[
|
||||
let g:slime_dispatch_ipython_pause = 100
|
||||
function SlimeOverride_EscapeText_quarto(text)
|
||||
call v:lua.Quarto_is_in_python_chunk()
|
||||
if exists('g:slime_python_ipython') && len(split(a:text,"\n")) > 1 && b:quarto_is_python_chunk && !(exists('b:quarto_is_r_mode') && b:quarto_is_r_mode)
|
||||
return ["%cpaste -q\n", g:slime_dispatch_ipython_pause, a:text, "--", "\n"]
|
||||
else
|
||||
if exists('b:quarto_is_r_mode') && b:quarto_is_r_mode && b:quarto_is_python_chunk
|
||||
return [a:text, "\n"]
|
||||
else
|
||||
return [a:text]
|
||||
end
|
||||
end
|
||||
endfunction
|
||||
]]
|
||||
|
||||
vim.g.slime_target = 'neovim'
|
||||
vim.g.slime_no_mappings = true
|
||||
vim.g.slime_python_ipython = 1
|
||||
end,
|
||||
config = function()
|
||||
vim.g.slime_input_pid = false
|
||||
vim.g.slime_suggest_default = true
|
||||
vim.g.slime_menu_config = false
|
||||
vim.g.slime_neovim_ignore_unlisted = true
|
||||
|
||||
local function mark_terminal()
|
||||
local job_id = vim.b.terminal_job_id
|
||||
vim.print('job_id: ' .. job_id)
|
||||
end
|
||||
|
||||
local function set_terminal()
|
||||
vim.fn.call('slime#config', {})
|
||||
end
|
||||
vim.keymap.set('n', '<leader>cm', mark_terminal, { desc = '[m]ark terminal' })
|
||||
vim.keymap.set('n', '<leader>cs', set_terminal, { desc = '[s]et terminal' })
|
||||
end
|
||||
}
|
Loading…
Reference in New Issue