More plugins

This commit is contained in:
Norm Rasmussen
2022-07-05 17:39:49 -04:00
parent 44a4c3f80f
commit f98d778ec7
8 changed files with 183 additions and 20 deletions

17
lua/plugins/_mkdx.lua Normal file
View File

@ -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' ] },
\ }
]]

124
lua/plugins/headlines.lua Normal file
View File

@ -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,
},
}

View File

@ -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 = "",

View File

@ -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'

View File

@ -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