diff --git a/init.lua b/init.lua index db27bb1..118055e 100755 --- a/init.lua +++ b/init.lua @@ -16,3 +16,4 @@ require('plugins/nvim-lsp-installer') require('plugins/neoscroll') require('plugins/marks') require('plugins/toggleterm') +require('plugins/_mkdx') diff --git a/lua/keymaps.lua b/lua/keymaps.lua index 0dd4829..314c3f7 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -42,14 +42,15 @@ map('n', 'q', ':NvimTreeRefresh', default_opts) -- refresh map('n', '', ':Vista!!', default_opts) -- open/close -- Place Check box for To-Do style Lists -map('i','', '[ ] - ', default_opts) -map('n','', 'rXi', default_opts) +map('i','', '- [ ] ', default_opts) +map('n', '', '- [ ] ', default_opts) +map('n','', 'rX', default_opts) map('n','x', '~~~', default_opts) -- Vim Tmux Navigator -map ('n', '-', ':TmuxNavigateDown', default_opts) -map ('n', '[', ':TmuxNavigateLeft', default_opts) -map ('n', ']', ':TmuxNavigateRight', default_opts) +map('n', '-', ':TmuxNavigateDown', default_opts) +map('n', '[', ':TmuxNavigateLeft', default_opts) +map('n', ']', ':TmuxNavigateRight', default_opts) -- Telescope Open -map ('n', '/', ':Telescope', default_opts) +map('n', '/', ':Telescope', default_opts) diff --git a/lua/plugins/_mkdx.lua b/lua/plugins/_mkdx.lua new file mode 100644 index 0000000..f2fe74e --- /dev/null +++ b/lua/plugins/_mkdx.lua @@ -0,0 +1,17 @@ +local cmd = vim.cmd +local g = vim.g + +g['mkdx#settings.highlight.enable'] = 1 + +cmd [[ + let g:mkdx#settings = { + \ 'highlight': { 'enable': 1 }, + \ 'map': { 'prefix': '<=>' }, + \ 'enter': { 'shift': 1, 'enable': 1 }, + \ 'links': { 'external': { 'enable': 1 }, 'fragment': { 'jumplist': 1 } }, + \ 'toc': { 'text': 'Table of Contents', 'update_on_write': 1}, + \ 'fold': { 'enable': 1 }, + \ 'checkbox': { 'toggles': [' ', '-', 'X' ] }, + \ } +]] + diff --git a/lua/plugins/headlines.lua b/lua/plugins/headlines.lua new file mode 100644 index 0000000..6c3aed1 --- /dev/null +++ b/lua/plugins/headlines.lua @@ -0,0 +1,124 @@ +require("headlines").setup { + markdown = { + query = vim.treesitter.parse_query( + "markdown", + [[ + (atx_heading [ + (atx_h1_marker) + (atx_h2_marker) + (atx_h3_marker) + (atx_h4_marker) + (atx_h5_marker) + (atx_h6_marker) + ] @headline) + + (thematic_break) @dash + + (fenced_code_block) @codeblock + + (block_quote_marker) @quote + (block_quote (paragraph (inline (block_continuation) @quote))) + ]] + ), + headline_highlights = { "Headline" }, + codeblock_highlight = "CodeBlock", + dash_highlight = "Dash", + dash_string = "-", + quote_highlight = "Quote", + quote_string = "┃", + fat_headlines = true, + }, + rmd = { + query = vim.treesitter.parse_query( + "markdown", + [[ + (atx_heading [ + (atx_h1_marker) + (atx_h2_marker) + (atx_h3_marker) + (atx_h4_marker) + (atx_h5_marker) + (atx_h6_marker) + ] @headline) + + (thematic_break) @dash + + (fenced_code_block) @codeblock + + (block_quote_marker) @quote + (block_quote (paragraph (inline (block_continuation) @quote))) + ]] + ), + treesitter_language = "markdown", + headline_highlights = { "Headline" }, + codeblock_highlight = "CodeBlock", + dash_highlight = "Dash", + dash_string = "-", + quote_highlight = "Quote", + quote_string = "┃", + fat_headlines = true, + }, + norg = { + query = vim.treesitter.parse_query( + "norg", + [[ + [ + (heading1_prefix) + (heading2_prefix) + (heading3_prefix) + (heading4_prefix) + (heading5_prefix) + (heading6_prefix) + ] @headline + + (weak_paragraph_delimiter) @dash + (strong_paragraph_delimiter) @doubledash + + ((ranged_tag + name: (tag_name) @_name + (#eq? @_name "code") + ) @codeblock (#offset! @codeblock 0 0 1 0)) + + (quote1_prefix) @quote + ]] + ), + headline_highlights = { "Headline" }, + codeblock_highlight = "CodeBlock", + dash_highlight = "Dash", + dash_string = "-", + doubledash_highlight = "DoubleDash", + doubledash_string = "=", + quote_highlight = "Quote", + quote_string = "┃", + fat_headlines = true, + }, + org = { + query = vim.treesitter.parse_query( + "org", + [[ + (headline (stars) @headline) + + ( + (expr) @dash + (#match? @dash "^-----+$") + ) + + (block + name: (expr) @_name + (#eq? @_name "SRC") + ) @codeblock + + (paragraph . (expr) @quote + (#eq? @quote ">") + ) + ]] + ), + headline_highlights = { "Headline" }, + codeblock_highlight = "CodeBlock", + dash_highlight = "Dash", + dash_string = "-", + quote_highlight = "Quote", + quote_string = "┃", + fat_headlines = true, + }, +} diff --git a/lua/plugins/nvim-lsp-installer.lua b/lua/plugins/nvim-lsp-installer.lua index a33f35b..2ad64ff 100644 --- a/lua/plugins/nvim-lsp-installer.lua +++ b/lua/plugins/nvim-lsp-installer.lua @@ -1,6 +1,5 @@ -local lsp_installer = require("nvim-lsp-installer") - -lsp_installer.settings({ +local lsp_installer = require("nvim-lsp-installer").setup({ + automatic_installation = true, ui = { icons = { server_installed = "✓", diff --git a/lua/plugins/plugins.lua b/lua/plugins/plugins.lua index f18317e..68e8005 100755 --- a/lua/plugins/plugins.lua +++ b/lua/plugins/plugins.lua @@ -11,9 +11,20 @@ return require'packer'.startup(function() -- Nvim Tree File Manager on the Left use 'kyazdani42/nvim-tree.lua' + -- Markdown Extension for Customizable Keymappings + use 'SidOfc/mkdx' + + -- Headlines Extension + use 'lukas-reineke/headlines.nvim' + + -- Follow MD Links + use 'jghauser/follow-md-links.nvim' + + -- Treesitter Language Stuff use 'nvim-treesitter/nvim-treesitter' - use 'sheerun/vim-polyglot' + -- I don't know what polygot does or if I need it. + -- use 'sheerun/vim-polyglot' use 'tjdevries/colorbuddy.nvim' diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua index 24a3dd6..7d8489f 100644 --- a/lua/plugins/toggleterm.lua +++ b/lua/plugins/toggleterm.lua @@ -29,7 +29,7 @@ function _G.set_terminal_keymaps() end vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()') ---vim.cmd('set shell=fish') +vim.cmd('set shell=zsh') local Terminal = require("toggleterm.terminal").Terminal diff --git a/plugin/packer_compiled.lua b/plugin/packer_compiled.lua index 69ae326..3f86737 100644 --- a/plugin/packer_compiled.lua +++ b/plugin/packer_compiled.lua @@ -154,6 +154,11 @@ _G.packer_plugins = { path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/feline.nvim", url = "https://github.com/feline-nvim/feline.nvim" }, + ["follow-md-links.nvim"] = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/follow-md-links.nvim", + url = "https://github.com/jghauser/follow-md-links.nvim" + }, ["gitsigns.nvim"] = { loaded = true, path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/gitsigns.nvim", @@ -164,6 +169,11 @@ _G.packer_plugins = { path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/gloombuddy", url = "https://github.com/bkegley/gloombuddy" }, + ["headlines.nvim"] = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/headlines.nvim", + url = "https://github.com/lukas-reineke/headlines.nvim" + }, ["indent-blankline.nvim"] = { loaded = true, path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim", @@ -174,6 +184,11 @@ _G.packer_plugins = { path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/marks.nvim", url = "https://github.com/chentoast/marks.nvim" }, + mkdx = { + loaded = true, + path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/mkdx", + url = "https://github.com/SidOfc/mkdx" + }, ["monokai.nvim"] = { loaded = true, path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/monokai.nvim", @@ -262,11 +277,6 @@ _G.packer_plugins = { path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/tokyonight.nvim", url = "https://github.com/folke/tokyonight.nvim" }, - ["vim-polyglot"] = { - loaded = true, - path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/vim-polyglot", - url = "https://github.com/sheerun/vim-polyglot" - }, ["vim-prettier"] = { loaded = true, path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/vim-prettier", @@ -294,14 +304,14 @@ time([[Defining packer_plugins]], false) time([[Config for nvim-autopairs]], true) try_loadstring("\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-autopairs") time([[Config for nvim-autopairs]], false) --- Config for: telescope.nvim -time([[Config for telescope.nvim]], true) -try_loadstring("\27LJ\2\n1\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\22plugins/telescope\frequire\0", "config", "telescope.nvim") -time([[Config for telescope.nvim]], false) -- Config for: toggleterm.nvim time([[Config for toggleterm.nvim]], true) try_loadstring("\27LJ\2\nY\0\0\3\0\4\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\3\0B\0\2\1K\0\1\0\1\0\1\nshell\24/usr/bin/local/fish\nsetup\15toggleterm\frequire\0", "config", "toggleterm.nvim") time([[Config for toggleterm.nvim]], false) +-- Config for: telescope.nvim +time([[Config for telescope.nvim]], true) +try_loadstring("\27LJ\2\n1\0\0\3\0\2\0\0046\0\0\0'\2\1\0B\0\2\1K\0\1\0\22plugins/telescope\frequire\0", "config", "telescope.nvim") +time([[Config for telescope.nvim]], false) if should_profile then save_profiles() end end)