markdown: configure the markdown environment
- Adds the `markdown-preview.nvim` plugin. - Adds the two `vim-pandoc` and `vim-pandoc-syntax` for the support of markdown syntax and for file conversions with pandoc. - Sets basic options (max width of 79 chars). - Restores the `.gitignore` rules of the kickstart.nvim project. - Adds and configures the Nordic colorscheme plugin. - Sets the English, French and German spelling. - Adds the `mkdnflow` plugin to get notebook features. Co-Authored-by: iGor milhit <igor@milhit.ch>
parent
9cae3c7b03
commit
25c736d4f7
|
@ -7,3 +7,9 @@ autoload
|
||||||
|
|
||||||
# spell *.spl
|
# spell *.spl
|
||||||
spell/fr.utf-8.add.spl
|
spell/fr.utf-8.add.spl
|
||||||
|
|
||||||
|
tags
|
||||||
|
test.sh
|
||||||
|
.luarc.json
|
||||||
|
nvim
|
||||||
|
lazy-lock.json
|
||||||
|
|
27
init.lua
27
init.lua
|
@ -130,11 +130,17 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
-- Theme inspired by Atom
|
-- Nordic Theme
|
||||||
'navarasu/onedark.nvim',
|
'andersevenrud/nordic.nvim',
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd.colorscheme 'onedark'
|
require('nordic').colorscheme({
|
||||||
|
underline_option = 'none',
|
||||||
|
italic = true,
|
||||||
|
italic_comments = false,
|
||||||
|
minimal_mode = false,
|
||||||
|
alternate_backgrounds = false
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -145,7 +151,7 @@ require('lazy').setup({
|
||||||
opts = {
|
opts = {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
theme = 'onedark',
|
theme = 'nord',
|
||||||
component_separators = '|',
|
component_separators = '|',
|
||||||
section_separators = '/',
|
section_separators = '/',
|
||||||
},
|
},
|
||||||
|
@ -205,6 +211,10 @@ require('lazy').setup({
|
||||||
{ import = 'custom.plugins' },
|
{ import = 'custom.plugins' },
|
||||||
}, {})
|
}, {})
|
||||||
|
|
||||||
|
-- Restore the site folder of .local/share/nvim/ in the runtime rewritten by
|
||||||
|
-- lazy. See https://github.com/neovim/neovim/issues/23082#issuecomment-1510812311
|
||||||
|
vim.opt.rtp:append (vim.fn.stdpath ('data') .. '/site')
|
||||||
|
|
||||||
-- [[ Setting options ]]
|
-- [[ Setting options ]]
|
||||||
-- See `:help vim.o`
|
-- See `:help vim.o`
|
||||||
-- NOTE: You can change these options as you wish!
|
-- NOTE: You can change these options as you wish!
|
||||||
|
@ -215,6 +225,12 @@ vim.o.hlsearch = false
|
||||||
-- Make line numbers default
|
-- Make line numbers default
|
||||||
vim.wo.number = true
|
vim.wo.number = true
|
||||||
|
|
||||||
|
-- Set the maximum width of a line
|
||||||
|
vim.opt.textwidth = 79
|
||||||
|
|
||||||
|
-- Set text formatting options
|
||||||
|
-- vim.opt.formatoptions:append('a')
|
||||||
|
|
||||||
-- Enable mouse mode
|
-- Enable mouse mode
|
||||||
vim.o.mouse = 'a'
|
vim.o.mouse = 'a'
|
||||||
|
|
||||||
|
@ -247,6 +263,9 @@ vim.o.completeopt = 'menuone,noselect'
|
||||||
-- NOTE: You should make sure your terminal supports this
|
-- NOTE: You should make sure your terminal supports this
|
||||||
vim.o.termguicolors = true
|
vim.o.termguicolors = true
|
||||||
|
|
||||||
|
-- Set the spelling for English, French and German.
|
||||||
|
vim.opt.spelllang = 'en,fr,de'
|
||||||
|
|
||||||
-- [[ Basic Keymaps ]]
|
-- [[ Basic Keymaps ]]
|
||||||
|
|
||||||
-- Keymaps for better default experience
|
-- Keymaps for better default experience
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
{
|
|
||||||
"Comment.nvim": { "branch": "master", "commit": "e1fe53117aab24c378d5e6deaad786789c360123" },
|
|
||||||
"LuaSnip": { "branch": "master", "commit": "a83e4b1ba7edc6fecdad09e39753a7d5eee1d01c" },
|
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
|
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
|
||||||
"fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" },
|
|
||||||
"friendly-snippets": { "branch": "main", "commit": "8875cccf779160303bf2bed7d422717676f214fd" },
|
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "f868d82a36f7f7f5e110eb0a9659993984f59875" },
|
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "ceaf730b13e332cd76600d9795722413c236c684" },
|
|
||||||
"lazy.nvim": { "branch": "main", "commit": "ebdd0499551765e6a7aba220cc8ae4e0cdb6be69" },
|
|
||||||
"lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" },
|
|
||||||
"markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" },
|
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "f0ce33f4794a2364eb08d09d09380e8b04ec5e6a" },
|
|
||||||
"mason.nvim": { "branch": "main", "commit": "08b2fd308e0107eab9f0b59d570b69089fd0b522" },
|
|
||||||
"neo-tree.nvim": { "branch": "v2.x", "commit": "8c89efb93b8383666a6f989762c2f610f5f2c930" },
|
|
||||||
"neodev.nvim": { "branch": "main", "commit": "da3e9e05c60250984f1bf069d517d9fca5315453" },
|
|
||||||
"nui.nvim": { "branch": "main", "commit": "2b2732528e4a79eb8542568bd51d25f710395bd6" },
|
|
||||||
"nvim-cmp": { "branch": "main", "commit": "b43bfaf3229d6b39d8baaa567b13c6be0623bf12" },
|
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "9166622781a39a829878d1fd24c174529d996838" },
|
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "e23d5493cf14401ef02ec2e4e99b65f199869966" },
|
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "95b76b95eff25e1e64f363938cd853852355d70a" },
|
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "2a125024a137677930efcfdf720f205504c97268" },
|
|
||||||
"onedark.nvim": { "branch": "master", "commit": "f6e82074761473d30a722f5d90c60282de1ac41d" },
|
|
||||||
"plenary.nvim": { "branch": "master", "commit": "52544825d6b8be677eb395983515ad5e30ae1f2e" },
|
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" },
|
|
||||||
"telescope.nvim": { "branch": "0.1.x", "commit": "533c7fb1b3fb412a16e1c1c9cf6d2b1ac130f1b7" },
|
|
||||||
"vim-fugitive": { "branch": "master", "commit": "5f0d280b517cacb16f59316659966c7ca5e2bea2" },
|
|
||||||
"vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" },
|
|
||||||
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
|
|
||||||
"which-key.nvim": { "branch": "main", "commit": "e271c28118998c93a14d189af3395812a1aa646c" }
|
|
||||||
}
|
|
|
@ -1,11 +1,14 @@
|
||||||
-- makdown-preview.nvim
|
-- makdown-preview.nvim
|
||||||
-- installed with code found at https://github.com/iamcco/markdown-preview.nvim/issues/558#issuecomment-1514701537
|
-- 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 {
|
return {
|
||||||
{
|
{
|
||||||
"iamcco/markdown-preview.nvim",
|
"iamcco/markdown-preview.nvim",
|
||||||
ft = "markdown",
|
ft = "pandoc",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
build = "cd app && npm install && git reset --hard",
|
build = "cd app && yarn install",
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
-- Mkdownflow plugin.
|
||||||
|
-- Allows to follow links, anchors, create links, and many more.
|
||||||
|
-- https://github.com/jakewvincent/mkdnflow.nvim
|
||||||
|
|
||||||
|
-- Keymaps for mkdnflow.
|
||||||
|
-- Table
|
||||||
|
vim.keymap.set({'n','x','v'}, '<leader>tf', '<cmd>MkdnTableFormat<CR>', {desc = 'Format table under cursor'})
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"jakewvincent/mkdnflow.nvim",
|
||||||
|
ft = 'pandoc',
|
||||||
|
lazy = true,
|
||||||
|
config = function ()
|
||||||
|
require('mkdnflow').setup({
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
-- Pandoc plugins: vim-pandoc, vim-pandoc-syntax
|
||||||
|
|
||||||
|
-- Defines the filetypes that have to be recognize by vim-pandoc. Allows
|
||||||
|
-- mardown-preview to be available with pandoc filetype.
|
||||||
|
vim.cmd([[ let g:mkdp_filetypes = ['markdown', 'pandoc', 'pandoc.markdown'] ]])
|
||||||
|
|
||||||
|
-- Sets the pandoc formatting mode to hardwrap
|
||||||
|
vim.cmd([[ let g:pandoc#formatting#mode="hA" ]])
|
||||||
|
|
||||||
|
-- Keymaps to switch to soft or hardwarp, or to toggle.
|
||||||
|
vim.keymap.set('n', '<leader>sw', '<cmd>call pandoc#formatting#UseSoftWraps()<CR>', {desc = 'Switch to softwrap'})
|
||||||
|
vim.keymap.set('n', '<leader>hw', '<cmd>call pandoc#formatting#UseHardWraps()<CR>', {desc = 'Switch to hardwrap'})
|
||||||
|
vim.keymap.set('n', '<leader>tw', '<cmd>call pandoc#formatting#ToggleAutoformat()<CR>', {desc = 'Toggle autoformat, to deactivate it'})
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"vim-pandoc/vim-pandoc",
|
||||||
|
ft = "pandoc",
|
||||||
|
lazy = true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"vim-pandoc/vim-pandoc-syntax",
|
||||||
|
ft = "pandoc",
|
||||||
|
lazy = true,
|
||||||
|
},
|
||||||
|
}
|
Loading…
Reference in New Issue