This commit is contained in:
2025-08-24 19:39:28 +02:00
parent 57ec608fde
commit 643a7dfe04
19 changed files with 290 additions and 94 deletions

View File

@@ -1,6 +1,15 @@
-- Autocompletion
return {
{
'saghen/blink.compat',
-- use v2.* for blink.cmp v1.*
version = '2.*',
-- lazy.nvim will automatically load the plugin when it's required by blink.cmp
lazy = true,
-- make sure to set opts so that lazy.nvim calls blink.compat's setup
opts = {},
},
{ -- Autocompletion
'saghen/blink.cmp',
event = 'VimEnter',
@@ -32,7 +41,13 @@ return {
},
opts = {},
},
'folke/lazydev.nvim',
-- R-cmp
{
'R-nvim/cmp-r',
},
{
'folke/lazydev.nvim',
},
},
--- @module 'blink.cmp'
--- @type blink.cmp.Config
@@ -78,9 +93,10 @@ return {
},
sources = {
default = { 'lsp', 'path', 'snippets', 'lazydev' },
default = { 'lsp', 'path', 'snippets', 'lazydev', 'cmp_r' },
providers = {
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
cmp_r = { module = 'blink.compat.source', score_offset = 3 },
},
},
@@ -99,4 +115,4 @@ return {
signature = { enabled = true },
},
},
}
}

View File

@@ -21,14 +21,14 @@ return {
-- Mason must be loaded before its dependents so we need to set it up here.
-- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
{ 'mason-org/mason.nvim', opts = {} },
'mason-org/mason-lspconfig.nvim',
'WhoIsSethDaniel/mason-tool-installer.nvim',
{ 'mason-org/mason-lspconfig.nvim' },
{ 'WhoIsSethDaniel/mason-tool-installer.nvim' },
-- Useful status updates for LSP.
{ 'j-hui/fidget.nvim', opts = {} },
-- Allows extra capabilities provided by blink.cmp
'saghen/blink.cmp',
{ 'saghen/blink.cmp' },
},
config = function()
-- Brief aside: **What is LSP?**

View File

@@ -0,0 +1,116 @@
-- Markdown
-- https://github.com/MeanderingProgrammer/render-markdown.nvim
return {
{
'MeanderingProgrammer/render-markdown.nvim',
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
---@module 'render-markdown'
---@type render.md.UserConfig
opts = {
-- run on both Markdown and Quarto files
file_types = { 'markdown', 'quarto' },
-- means that in normal, command, and terminal modes you'll get a rendered view,
-- and in other modes such as insert the marks added by the plugin will disappear.
-- render_modes = { 'n', 'c', 't' },
-- in all modes
render_modes = true,
completions = {
blink = { enabled = true },
lsp = { enabled = true },
},
-- checkbox = {
-- enabled = true,
-- render_modes = true,
-- bullet = true,
-- right_pad = 1,
-- unchecked = {
-- icon = '󰄱 ',
-- highlight = 'RenderMarkdownUnchecked',
-- scope_highlight = nil,
-- },
-- checked = {
-- icon = '󰱒 ',
-- highlight = 'RenderMarkdownChecked',
-- scope_highlight = nil,
-- },
-- custom = {
-- todo = {
-- raw = '[-]',
-- rendered = '󰥔 ',
-- highlight = 'RenderMarkdownTodo',
-- scope_highlight = nil,
-- },
-- important = {
-- raw = '[~]',
-- rendered = '󰓎 ',
-- highlight = 'DiagnosticWarn',
-- },
-- checked = {
-- scope_highlight = '@markup.strikethrough',
-- },
-- },
-- },
-- code = {
-- enabled = true,
-- render_modes = false,
-- sign = true,
-- conceal_delimiters = true,
-- language = true,
-- position = 'left',
-- language_icon = true,
-- language_name = true,
-- language_info = true,
-- language_pad = 0,
-- disable_background = { 'diff' },
-- width = 'full',
-- left_margin = 0,
-- left_pad = 0,
-- right_pad = 0,
-- min_width = 0,
-- border = 'hide',
-- language_border = '█',
-- language_left = '',
-- language_right = '',
-- above = '▄',
-- below = '▀',
-- inline = true,
-- inline_left = '',
-- inline_right = '',
-- inline_pad = 0,
-- highlight = 'RenderMarkdownCode',
-- highlight_info = 'RenderMarkdownCodeInfo',
-- highlight_language = nil,
-- highlight_border = 'RenderMarkdownCodeBorder',
-- highlight_fallback = 'RenderMarkdownCodeFallback',
-- highlight_inline = 'RenderMarkdownCodeInline',
-- style = 'full',
-- },
-- latex = {
-- enabled = true,
-- render_modes = false,
-- converter = 'latex2text',
-- highlight = 'RenderMarkdownMath',
-- position = 'above',
-- top_pad = 0,
-- bottom_pad = 0,
-- },
-- quote = {
-- enabled = true,
-- render_modes = false,
-- icon = '▋',
-- repeat_linebreak = false,
-- highlight = {
-- 'RenderMarkdownQuote1',
-- 'RenderMarkdownQuote2',
-- 'RenderMarkdownQuote3',
-- 'RenderMarkdownQuote4',
-- 'RenderMarkdownQuote5',
-- 'RenderMarkdownQuote6',
-- },
-- },
},
},
}

View File

@@ -53,7 +53,7 @@ return {
-- Optional, if you keep daily notes in a separate directory.
folder = 'journal/daily',
-- Optional, if you want to change the date format for the ID of daily notes.
date_format = '%Y-%m-%d',
date_format = '%Y%m%d',
-- Optional, if you want to change the date format of the default alias of daily notes.
alias_format = '%B %-d, %Y',
-- Optional, default tags to add to each new daily note created.

View File

@@ -4,6 +4,11 @@
-- molten: https://github.com/benlubas/molten-nvim
--
--local wh_status, wh = pcall(require, 'custom.plugins.window-helper')
--if not wh_status then
-- return
--end
return {
{
'quarto-dev/quarto-nvim',
@@ -17,10 +22,21 @@ return {
lspFeatures = {
enabled = true,
chunks = 'curly',
languages = { 'r', 'python', 'julia', 'bash', 'html' },
diagnostics = {
enabled = true,
triggers = { 'BufWritePost' },
},
completion = {
enabled = true,
},
},
codeRunner = {
enabled = true,
default_method = 'slime',
default_method = 'slime', -- "molten", "slime", "iron" or <function>
ft_runners = {}, -- filetype to runner, ie. `{ python = "molten" }`.
-- Takes precedence over `default_method`
never_run = { 'yaml' }, -- filetypes which are never sent to a code runner
},
},
},
@@ -37,16 +53,16 @@ return {
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
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
]]
@@ -87,6 +103,12 @@ return {
vim.g.molten_auto_open_output = true
-- vim.g.molten_auto_open_html_in_browser = true
vim.g.molten_tick_rate = 200
vim.g.molten_output_win_col = math.floor((vim.o.columns - vim.o.columns * 0.9) / 2)
vim.g.molten_output_win_max_width = math.floor(vim.o.columns * 0.9)
vim.g.molten_output_win_border = { '', '', '', '', '', '', '', '' }
vim.g.molten_use_border_highlights = true
vim.g.molten_output_win_style = 'minimal' -- Style minimal pour la fenêtre
vim.g.molten_output_win_hide_on_leave = false -- Garder la fenêtre visible après avoir quitté
end,
config = function()
-- local init = function()
@@ -108,7 +130,7 @@ return {
end,
opts = {
auto_scroll = true,
jupyter_command = '/home/jeff/.asdf/shims/jupyter',
-- jupyter_command = '/home/jeff/.asdf/shims/jupyter',
},
},
{
@@ -124,7 +146,7 @@ return {
download_remote_images = true,
only_render_image_at_cursor = false,
only_render_image_at_cursor_mode = 'popup',
floating_windows = false, -- if true, images will be rendered in floating markdown windows
floating_windows = true, -- if true, images will be rendered in floating markdown windows
filetypes = { 'markdown', 'vimwiki', 'quarto' }, -- markdown extensions (ie. quarto) can go here
},
neorg = {
@@ -145,7 +167,7 @@ return {
max_width = nil,
max_height = nil,
max_width_window_percentage = nil,
max_height_window_percentage = 50,
max_height_window_percentage = 70,
window_overlap_clear_enabled = false, -- toggles images when windows are overlapped
window_overlap_clear_ft_ignore = { 'cmp_menu', 'cmp_docs', 'snacks_notif', 'scrollview', 'scrollview_sign' },
editor_only_render_when_focused = false, -- auto show/hide images when the editor gains/looses focus

View File

@@ -0,0 +1,63 @@
-- Themes
--
--
return {
-- You can easily change to a different colorscheme.
-- Change the name of the colorscheme plugin below, and then
-- change the command in the config to whatever the name of that colorscheme is.
--
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
{
'bluz71/vim-moonfly-colors',
lazy = false,
priority = 1000,
config = function()
vim.cmd.syntax 'enable'
vim.g.moonflyCursorColor = true
vim.g.moonflyItalics = true
vim.g.moonflyNormalFloat = true
vim.g.moonflyTerminalColors = true
vim.g.moonflyUndercurls = true
vim.g.moonflyUnderlineMatchParen = true
vim.g.moonflyVirtualTextColor = true
vim.api.nvim_set_hl(0, 'MoltenOutputBorder', { link = 'Normal' })
vim.api.nvim_set_hl(0, 'MoltenOutputBorderFail', { link = 'MoonflyCrimson' })
vim.api.nvim_set_hl(0, 'MoltenOutputBorderSuccess', { link = 'MoonflyBlue' })
end,
},
{
-- Like many other themes, this one has different styles, and you could load
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
'folke/tokyonight.nvim',
priority = 1000, -- Make sure to load this before all the other start plugins.
config = function()
---@diagnostic disable-next-line: missing-fields
require('tokyonight').setup {
styles = {
comments = { italic = false }, -- Disable italics in comments
},
}
end,
},
{
'yorumicolors/yorumi.nvim',
priority = 1000, -- Make sure to load this before all the other start plugins.
config = function()
---@diagnostic disable-next-line: missing-fields
end,
},
{
'navarasu/onedark.nvim',
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
require('onedark').setup {
style = 'darker',
}
-- require('onedark').load()
end,
},
}