This commit is contained in:
Norm Rasmussen
2022-07-07 16:45:13 -04:00
parent 763faa9748
commit e1984cbb56
12 changed files with 146 additions and 135 deletions

View File

@ -0,0 +1,16 @@
local lsp_configs = require('plugins/nvim-lspconfig')
lsp_configs.prosemd = {
default_config = {
-- Update the path to prosemd-lsp
cmd = { "/usr/local/bin/prosemd-lsp", "--stdio" },
filetypes = { "markdown" },
root_dir = function(fname)
return lsp_util.find_git_ancestor(fname) or vim.fn.getcwd()
end,
settings = {},
}
}
-- Use your attach function here
lsp.prosemd.setup{ on_attach = on_attach }

View File

@ -9,7 +9,6 @@ require('plugins/vista')
require('plugins/nvim-cmp') require('plugins/nvim-cmp')
require('plugins/nvim-lspconfig') require('plugins/nvim-lspconfig')
require('plugins/nvim-treesitter') require('plugins/nvim-treesitter')
require('plugins/telescope')
require('plugins/alpha-nvim') require('plugins/alpha-nvim')
require('plugins/symbols-outline') require('plugins/symbols-outline')
require('plugins/nvim-lsp-installer') require('plugins/nvim-lsp-installer')
@ -17,3 +16,4 @@ require('plugins/neoscroll')
require('plugins/marks') require('plugins/marks')
require('plugins/toggleterm') require('plugins/toggleterm')
require('plugins/_mkdx') require('plugins/_mkdx')
require('plugins/mkdnflow')

View File

@ -15,9 +15,6 @@ map('n', '<C-j>', '<C-w>j', default_opts)
map('n', '<C-k>', '<C-w>k', default_opts) map('n', '<C-k>', '<C-w>k', default_opts)
map('n', '<C-l>', '<C-w>l', default_opts) map('n', '<C-l>', '<C-w>l', default_opts)
-- Close all windows and exit from Neovim with <leader> and q
-- map('n', '<leader>q', ':qa!<CR>', default_opts)
-- Neovim Tab Navigation -- Neovim Tab Navigation
map('n', '<leader>t', ':tabnew<CR>', default_opts) map('n', '<leader>t', ':tabnew<CR>', default_opts)
map('n', '<leader>w', ':-tabnext<CR>', default_opts) map('n', '<leader>w', ':-tabnext<CR>', default_opts)
@ -28,9 +25,6 @@ map('n', '<leader>r', ':tabclose<CR>', default_opts)
-- Applications and Plugins shortcuts -- Applications and Plugins shortcuts
----------------------------------------------------------- -----------------------------------------------------------
-- Open terminal as Float
--map('n', '<c-o>', ':ToggleTerm dir=/Users/normrasmussen/ direction=float<CR>', default_opts)
-- Vista Shortcuts -- Vista Shortcuts
map('n', '<leader>v', ':Vista!!<CR>', default_opts) -- show Vista panel map('n', '<leader>v', ':Vista!!<CR>', default_opts) -- show Vista panel
@ -44,13 +38,10 @@ map('n', '<C-m>', ':Vista!!<CR>', default_opts) -- open/close
-- Place Check box for To-Do style Lists -- Place Check box for To-Do style Lists
map('i','<C-z>', '- [ ] ', default_opts) map('i','<C-z>', '- [ ] ', default_opts)
map('n', '<C-z>', '- [ ] ', default_opts) map('n', '<C-z>', '- [ ] ', default_opts)
map('n','<C-x>', '<Esc>rX<Esc>', default_opts) --map('n','<C-x>', '<Esc>rX<Esc>', default_opts)
map('n','<leader>x', '~~~', default_opts) --map('n','<leader>x', '~~~', default_opts)
-- Vim Tmux Navigator -- Vim Tmux Navigator
map('n', '<leader>-', ':TmuxNavigateDown', default_opts) --map('n', '<leader>-', ':TmuxNavigateDown', default_opts)
map('n', '<leader>[', ':TmuxNavigateLeft', default_opts) map('n', '<leader>[', ':TmuxNavigateLeft', default_opts)
map('n', '<leader>]', ':TmuxNavigateRight', default_opts) map('n', '<leader>]', ':TmuxNavigateRight', default_opts)
-- Telescope Open
map('n', '<leader>/', ':Telescope<CR>', default_opts)

71
lua/plugins/mkdnflow.lua Normal file
View File

@ -0,0 +1,71 @@
-- ** DEFAULT SETTINGS; TO USE THESE, PASS AN EMPTY TABLE TO THE SETUP FUNCTION **
require('mkdnflow').setup({
filetypes = {md = true, rmd = true, markdown = true},
create_dirs = true,
perspective = {
priority = 'first',
fallback = 'current',
root_tell = false,
nvim_wd_heel = true
},
wrap = false,
bib = {
default_path = nil,
find_in_root = true
},
silent = false,
links = {
style = 'markdown',
conceal = false,
implicit_extension = nil,
transform_implicit = false,
transform_explicit = function(text)
text = text:gsub(" ", "-")
text = text:lower()
text = os.date('%Y-%m-%d_')..text
return(text)
end
},
to_do = {
symbols = {' ', '-', 'X'},
update_parents = true,
not_started = ' ',
in_progress = '-',
complete = 'X'
},
tables = {
trim_whitespace = true,
format_on_move = true
},
use_mappings_table = true,
mappings = {
MkdnNextLink = {'n', '<Tab>'},
MkdnPrevLink = {'n', '<S-Tab>'},
MkdnNextHeading = {'n', '<leader>]'},
MkdnPrevHeading = {'n', '<leader>['},
MkdnGoBack = {'n', '<BS>'},
MkdnGoForward = {'n', '<Del>'},
MkdnFollowLink = {{'n', 'v'}, '<CR>'},
MkdnDestroyLink = {'n', '<M-CR>'},
MkdnMoveSource = {'n', '<F2>'},
MkdnYankAnchorLink = {'n', 'ya'},
MkdnYankFileAnchorLink = {'n', 'yfa'},
MkdnIncreaseHeading = {'n', '+'},
MkdnDecreaseHeading = {'n', '-'},
MkdnToggleToDo = {{'n', 'v'}, '<C-Space>'},
MkdnNewListItem = false,
MkdnExtendList = false,
MkdnUpdateNumbering = {'n', '<leader>nn'},
MkdnTableNextCell = {'i', '<leader>nc'},
MkdnTablePrevCell = {'i', '<leader>pc'},
MkdnTableNextRow = false,
MkdnTablePrevRow = {'i', '<M-CR>'},
MkdnTableNewRowBelow = {{'n', 'i'}, '<leader>ir'},
MkdnTableNewRowAbove = {{'n', 'i'}, '<leader>iR'},
MkdnTableNewColAfter = {{'n', 'i'}, '<leader>ic'},
MkdnTableNewColBefore = {{'n', 'i'}, '<leader>iC'},
MkdnCR = false,
MkdnTab = false,
MkdnSTab = false
}
})

View File

@ -86,7 +86,7 @@ https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.m
-- Use a loop to conveniently call 'setup' on multiple servers and -- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches -- map buffer local keybindings when the language server attaches
local servers = { 'bashls', 'pyright', 'pylsp', 'clangd', 'html', 'tsserver', 'grammarly', 'dockerls', 'cssls', 'cssmodules_ls', 'arduino_language_server', 'pyre', 'gopls', 'theme_check' } local servers = { 'bashls', 'pyright', 'pylsp', 'clangd', 'html', 'tsserver', 'marksman', 'prosemd_lsp', 'dockerls', 'cssls', 'cssmodules_ls', 'arduino_language_server', 'pyre', 'gopls', 'theme_check' }
-- Set settings for language servers: -- Set settings for language servers:

View File

@ -6,7 +6,15 @@
-- Plugin: nvim-treesitter -- Plugin: nvim-treesitter
-- url: https://github.com/nvim-treesitter/nvim-treesitter -- url: https://github.com/nvim-treesitter/nvim-treesitter
local parser_configs = require("nvim-treesitter.parsers").get_parser_configs()
parser_configs.markdown = {
install_info = {
url = "https://github.com/ikatyang/tree-sitter-markdown",
files = { "src/parser.c", "src/scanner.cc" },
},
filetype = "markdown",
}
require('nvim-treesitter.configs').setup { require('nvim-treesitter.configs').setup {
highlight = { highlight = {

View File

@ -14,12 +14,22 @@ return require'packer'.startup(function()
-- Markdown Extension for Customizable Keymappings -- Markdown Extension for Customizable Keymappings
use 'SidOfc/mkdx' use 'SidOfc/mkdx'
-- Markdown Flow
use {
"jakewvincent/mkdnflow.nvim",
config = function()
require('mkdnflow').setup()
end
}
-- Headlines Extension -- Headlines Extension
use 'lukas-reineke/headlines.nvim' use 'lukas-reineke/headlines.nvim'
-- Follow MD Links -- Follow MD Links
use 'jghauser/follow-md-links.nvim' use 'jghauser/follow-md-links.nvim'
-- Glow, a Markdown Preview plugin
use {"ellisonleao/glow.nvim", branch = 'main'}
-- Treesitter Language Stuff -- Treesitter Language Stuff
use 'nvim-treesitter/nvim-treesitter' use 'nvim-treesitter/nvim-treesitter'
@ -66,7 +76,7 @@ return require'packer'.startup(function()
use { use {
'sudormrfbin/cheatsheet.nvim', 'sudormrfbin/cheatsheet.nvim',
requires = { requires = {
{'nvim-telescope/telescope.nvim'}, --{'nvim-telescope/telescope.nvim'},
{'nvim-lua/popup.nvim'}, {'nvim-lua/popup.nvim'},
{'nvim-lua/plenary.nvim'}, {'nvim-lua/plenary.nvim'},
} }
@ -76,7 +86,7 @@ return require'packer'.startup(function()
tag = 'v1.*', tag = 'v1.*',
config = function() config = function()
require('toggleterm').setup({ require('toggleterm').setup({
shell = '/usr/bin/local/fish', shell = '/usr/bin/local/zsh',
}) })
end, end,
} }
@ -97,7 +107,7 @@ return require'packer'.startup(function()
'goolord/alpha-nvim', 'goolord/alpha-nvim',
requires = { 'kyazdani42/nvim-web-devicons' }, requires = { 'kyazdani42/nvim-web-devicons' },
} }
use { --[[use {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
requires = { requires = {
"nvim-lua/popup.nvim", "nvim-lua/popup.nvim",
@ -106,7 +116,7 @@ return require'packer'.startup(function()
config = function() config = function()
require "plugins/telescope" require "plugins/telescope"
end, end,
} }]]--
use { use {
'windwp/nvim-autopairs', 'windwp/nvim-autopairs',
config = function() config = function()

View File

@ -1,104 +0,0 @@
local actions = require "telescope.actions"
local M = {}
M.project_files = function()
local opts = {} -- define here if you want to define something
local ok = pcall(require("telescope.builtin").git_files, opts)
if not ok then
require("telescope.builtin").find_files(opts)
end
end
require("telescope").setup {
defaults = {
prompt_prefix = "/ ",
selection_caret = "",
color_devicons = false,
mappings = {
i = {
["<Esc>"] = actions.close,
["<C-n>"] = actions.move_selection_next,
["<C-p>"] = actions.move_selection_previous,
["<C-j>"] = actions.move_selection_next,
["<C-k>"] = actions.move_selection_previous,
["<C-c>"] = actions.close,
["<Down>"] = false,
["<Up>"] = false,
["<CR>"] = actions.select_default + actions.center,
["<C-x>"] = actions.select_horizontal,
["<C-v>"] = actions.select_vertical,
["<C-u>"] = actions.preview_scrolling_up,
["<C-d>"] = actions.preview_scrolling_down,
},
n = {
["<Esc>"] = actions.close,
["<CR>"] = actions.select_default + actions.center,
["<C-x>"] = actions.select_horizontal,
["<C-v>"] = actions.select_vertical,
["j"] = actions.move_selection_next,
["k"] = actions.move_selection_previous,
["<Down>"] = false,
["<Up>"] = false,
["<C-u>"] = actions.preview_scrolling_up,
["<C-d>"] = actions.preview_scrolling_down,
},
},
file_ignore_patterns = {
".git/*",
"node_modules/*",
"bower_components/*",
".svn/*",
".hg/*",
"CVS/*",
".next/*",
".docz/*",
".DS_Store",
},
layout_strategy = "flex",
scroll_strategy = "cycle",
},
pickers = {
find_files = {
theme = "ivy",
},
git_files = {
theme = "ivy",
},
live_grep = {
theme = "ivy",
previewer = false,
},
file_browser = {
theme = "ivy",
previewer = false,
},
},
}
vim.api.nvim_set_keymap(
"n",
"<C-p>",
'<cmd>lua require("plugins/telescope").project_files()<CR>',
{ noremap = true, silent = true }
)
vim.api.nvim_set_keymap(
"n",
"<Leader>g",
'<cmd>lua require("telescope.builtin").live_grep()<CR>',
{ noremap = true, silent = true }
)
vim.api.nvim_set_keymap(
"n",
"<Leader>f",
'<cmd>lua require("telescope.builtin").file_browser()<CR>',
{ noremap = true, silent = true }
)
vim.api.nvim_set_keymap(
"n",
"<Leader>b",
'<cmd>lua require("telescope.builtin").buffers()<CR>',
{ noremap = true, silent = true }
)
return M

View File

@ -5,7 +5,7 @@ end
toggleterm.setup({ toggleterm.setup({
size = 10, size = 10,
open_mapping = [[<c-\>]], open_mapping = [[<c-==>]],
hide_numbers = true, hide_numbers = true,
shade_filetypes = {}, shade_filetypes = {},
shade_terminals = true, shade_terminals = true,

View File

@ -22,6 +22,7 @@ g.vista_default_executive = 'ctags'
-- Ensure you have installed some decent font to show these pretty symbols, -- Ensure you have installed some decent font to show these pretty symbols,
--- then you can enable icon for the kind. --- then you can enable icon for the kind.
cmd [[let g:vista#renderer#enable_icon = 1]] cmd [[let g:vista#renderer#enable_icon = 1]]
cmd [[let g:vista_enable_markdown_extension = 1]]
-- Change some default icons -- Change some default icons

View File

@ -19,9 +19,10 @@ opt.clipboard = 'unnamedplus' -- Copy/paste to system clipboard
opt.swapfile = false -- Don't use swapfile opt.swapfile = false -- Don't use swapfile
opt.shadafile = "NONE" opt.shadafile = "NONE"
opt.shadafile = "" opt.shadafile = ""
opt.shell = "/bin/bash" opt.shell = "/bin/zsh"
opt.updatetime = 200 opt.updatetime = 200
opt.cursorline = true opt.cursorline = true
g.markdown_folding = 1
----------------------------------------------------------- -----------------------------------------------------------
-- Neovim UI -- Neovim UI
----------------------------------------------------------- -----------------------------------------------------------
@ -55,10 +56,22 @@ opt.expandtab = true -- Use spaces instead of tabs
opt.shiftwidth = 4 -- Shift 4 spaces when tab opt.shiftwidth = 4 -- Shift 4 spaces when tab
opt.tabstop = 4 -- 1 tab == 4 spaces opt.tabstop = 4 -- 1 tab == 4 spaces
opt.smartindent = true -- Autoindent new lines opt.smartindent = true -- Autoindent new lines
-----------------------------------------------------------
-- Glow Settings
-----------------------------------------------------------
g.glow_binary_path = '/bin'
g.glow_border = 'rounded'
g.glow_width = 120
g.glow_use_pager = true
g.glow_style = 'dark'
-----------------------------------------------------------
-- MKDX Settings, mkdx#settings.
-----------------------------------------------------------
-- 2 spaces for selected filetypes -- 2 spaces for selected filetypes
cmd [[ cmd [[
autocmd FileType liquid,xml,html,xhtml,css,scss,javascript,lua,yaml setlocal shiftwidth=2 tabstop=2 autocmd FileType md,liquid,xml,html,xhtml,css,scss,javascript,lua,yaml setlocal shiftwidth=2 tabstop=2
]] ]]
local disabled_built_ins = { local disabled_built_ins = {

View File

@ -169,6 +169,11 @@ _G.packer_plugins = {
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/gloombuddy", path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/gloombuddy",
url = "https://github.com/bkegley/gloombuddy" url = "https://github.com/bkegley/gloombuddy"
}, },
["glow.nvim"] = {
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/glow.nvim",
url = "https://github.com/ellisonleao/glow.nvim"
},
["headlines.nvim"] = { ["headlines.nvim"] = {
loaded = true, loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/headlines.nvim", path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/headlines.nvim",
@ -184,6 +189,12 @@ _G.packer_plugins = {
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/marks.nvim", path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/marks.nvim",
url = "https://github.com/chentoast/marks.nvim" url = "https://github.com/chentoast/marks.nvim"
}, },
["mkdnflow.nvim"] = {
config = { "\27LJ\2\n:\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\rmkdnflow\frequire\0" },
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/mkdnflow.nvim",
url = "https://github.com/jakewvincent/mkdnflow.nvim"
},
mkdx = { mkdx = {
loaded = true, loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/mkdx", path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/mkdx",
@ -260,12 +271,6 @@ _G.packer_plugins = {
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/symbols-outline.nvim", path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/symbols-outline.nvim",
url = "https://github.com/simrat39/symbols-outline.nvim" url = "https://github.com/simrat39/symbols-outline.nvim"
}, },
["telescope.nvim"] = {
config = { "\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" },
loaded = true,
path = "/Users/normrasmussen/.local/share/nvim/site/pack/packer/start/telescope.nvim",
url = "https://github.com/nvim-telescope/telescope.nvim"
},
["toggleterm.nvim"] = { ["toggleterm.nvim"] = {
config = { "\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 = { "\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" },
loaded = true, loaded = true,
@ -308,10 +313,10 @@ time([[Config for nvim-autopairs]], false)
time([[Config for toggleterm.nvim]], true) 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") 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) time([[Config for toggleterm.nvim]], false)
-- Config for: telescope.nvim -- Config for: mkdnflow.nvim
time([[Config for telescope.nvim]], true) time([[Config for mkdnflow.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") try_loadstring("\27LJ\2\n:\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\rmkdnflow\frequire\0", "config", "mkdnflow.nvim")
time([[Config for telescope.nvim]], false) time([[Config for mkdnflow.nvim]], false)
if should_profile then save_profiles() end if should_profile then save_profiles() end
end) end)