From 13e1faf10c838dd457c2f9c28dac029fca8a2029 Mon Sep 17 00:00:00 2001 From: iGor milhit Date: Fri, 16 Jun 2023 15:43:27 +0200 Subject: [PATCH] plugins: improve configuration, install plugins - Fixes the markdown preview node package installation. - Removes the markdown preview theme configuration. - Adds the ToggleTerm plugin that allows to improve the managment of terminal buffers and configures it. - Ensures to use the legacy tag for the fidget plugin, as it will be under active development and rewritting. - Installs Grammalect, which is a French language checker. This plugin requires the python package `Grammalecte` that provide `grammalecte-cli` and `grammalecte-server`. - Sets, in the mkdnflow configuration, the `perspective.priority` to `current` to get the follow link feature behaves as I need, relative to the current buffer. - Fixes, in the mkdnflow configuration, the new file template to avoid a blank column at the begining (results in an invalid YAML syntax). Co-Authored-by: iGor milhit --- init.lua | 2 +- lua/custom/plugins/grammalecte.lua | 14 ++++++++++++++ lua/custom/plugins/markdownpreview.lua | 5 +---- lua/custom/plugins/mkdnflow.lua | 16 ++++++++++------ lua/custom/plugins/toggleterm.lua | 16 ++++++++++++++++ spell/en.utf-8.add | 5 +++++ spell/en.utf-8.add.spl | Bin 105 -> 0 bytes 7 files changed, 47 insertions(+), 11 deletions(-) create mode 100644 lua/custom/plugins/grammalecte.lua create mode 100644 lua/custom/plugins/toggleterm.lua delete mode 100644 spell/en.utf-8.add.spl diff --git a/init.lua b/init.lua index fe52973..9ef14e6 100644 --- a/init.lua +++ b/init.lua @@ -87,7 +87,7 @@ require('lazy').setup({ -- Useful status updates for LSP -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` - { 'j-hui/fidget.nvim', opts = {} }, + { 'j-hui/fidget.nvim', tag = "legacy", opts = {} }, -- Additional lua configuration, makes nvim stuff amazing! 'folke/neodev.nvim', diff --git a/lua/custom/plugins/grammalecte.lua b/lua/custom/plugins/grammalecte.lua new file mode 100644 index 0000000..e63e826 --- /dev/null +++ b/lua/custom/plugins/grammalecte.lua @@ -0,0 +1,14 @@ +-- Plugin to get Grammalecte checks in (neo)vim. + +-- Set the path to the grammalecte-cli executable +vim.cmd([[ let g:grammalecte_cli_py = "/usr/bin/grammalecte-cli" ]]) + +return { + "dpelle/vim-Grammalecte", + ft = { + "pandoc", + "markdown", + "text", + "gitcommit" + } +} diff --git a/lua/custom/plugins/markdownpreview.lua b/lua/custom/plugins/markdownpreview.lua index c86b5d1..6c61e40 100644 --- a/lua/custom/plugins/markdownpreview.lua +++ b/lua/custom/plugins/markdownpreview.lua @@ -1,9 +1,6 @@ -- makdown-preview.nvim -- installed with code found at https://github.com/iamcco/markdown-preview.nvim/issues/558#issuecomment-1514701537 --- Force the light theme, no matter the system option is. -vim.cmd([[ let g:mkdp_theme = 'light' ]]) - return { { "iamcco/markdown-preview.nvim", @@ -12,6 +9,6 @@ return { 'markdown' }, lazy = true, - build = "cd app && yarn install", + build = "cd app && npm install && git reset --hard", }, } diff --git a/lua/custom/plugins/mkdnflow.lua b/lua/custom/plugins/mkdnflow.lua index e965d83..4531df8 100644 --- a/lua/custom/plugins/mkdnflow.lua +++ b/lua/custom/plugins/mkdnflow.lua @@ -22,18 +22,22 @@ return { markdown = true, pandoc = true }, + perspective = { + -- Ensure that paths are relative to the current file + priority = "current" + }, links = { conceal = true, }, new_file_template = { use_template = true, template = [[ - --- - title: - date: {{ date }} - id: {{ id }} - tags: [] - --- +--- +title: +date: {{ date }} +id: {{ id }} +tags: [] +--- ]], placeholders = { before = { diff --git a/lua/custom/plugins/toggleterm.lua b/lua/custom/plugins/toggleterm.lua new file mode 100644 index 0000000..68980a7 --- /dev/null +++ b/lua/custom/plugins/toggleterm.lua @@ -0,0 +1,16 @@ +-- A neovim lua plugin to help easily manage multiple terminal windows +-- https://github.com/akinsho/toggleterm.nvim + +-- Set ZSH as shell to get it in a terminal buffer +vim.opt.shell = "/usr/bin/zsh" + +return { + { + 'akinsho/toggleterm.nvim', + version = "*", + opts = { + -- Avoid terminal to be darker than the Nord colorscheme + shade_terminals = false + } + } +} diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index 796fdcb..be24260 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -4,3 +4,8 @@ Séverine HEG neovim lua +InfoBiblio +Réaménagement +biodiversité +hyperindustrialisés +lacto-fermentation diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl deleted file mode 100644 index 99ecb19774e8c686bd4640e5a4716165ffa5e936..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 105 zcmWIZ^erw(&B-zP&%nT7&z6{$k&{=