moving config chops to a single file on custom

This commit is contained in:
Javier Pacheco 2023-06-10 06:01:52 -05:00
parent eee518cdab
commit c39dde3549
11 changed files with 454 additions and 164 deletions

View File

@ -1,28 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
<!-- Any bug report not following this template will be immediately closed. Thanks -->
## Describe the bug
<!-- A clear and concise description of what the bug is. -->
## To Reproduce
<!-- Steps to reproduce the behavior. -->
1. ...
## Desktop
<!-- please complete the following information. -->
- OS:
- Terminal:
## Neovim Version
<!-- Output of running `:version` from inside of neovim. -->
```
```

7
.gitignore vendored
View File

@ -1,5 +1,2 @@
tags
test.sh
.luarc.json
nvim
lazy-lock.json
lazy-lock.json
.stylua.toml

319
assets/markdown.css Normal file
View File

@ -0,0 +1,319 @@
/*
* github like style
* https://github.com/iamcco/markdown.css/blob/master/dest/github/markdown.css
*/
:root {
--color-text-primary: #333;
--color-text-tertiary: #777;
--color-text-link: #4078c0;
--color-bg-primary: #fff;
--color-bg-secondary: #fafbfc;
--color-bg-tertiary: #f8f8f8;
--color-border-primary: #ddd;
--color-border-secondary: #eaecef;
--color-border-tertiary: #d1d5da;
--color-kbd-foreground: #444d56;
--color-markdown-blockquote-border: #dfe2e5;
--color-markdown-table-border: #dfe2e5;
--color-markdown-table-tr-border: #c6cbd1;
--color-markdown-code-bg: #1b1f230d;
}
[data-theme="dark"] {
--color-text-primary: #c9d1d9;
--color-text-tertiary: #8b949e;
--color-text-link: #58a6ff;
--color-bg-primary: #0d1117;
--color-bg-secondary: #0d1117;
--color-bg-tertiary: #161b22;
--color-border-primary: #30363d;
--color-border-secondary: #21262d;
--color-border-tertiary: #6e7681;
--color-kbd-foreground: #b1bac4;
--color-markdown-blockquote-border: #3b434b;
--color-markdown-table-border: #3b434b;
--color-markdown-table-tr-border: #272c32;
--color-markdown-code-bg: #f0f6fc26;
}
.markdown-body ol ol,
.markdown-body ul ol,
.markdown-body ol ul,
.markdown-body ul ul,
.markdown-body ol ul ol,
.markdown-body ul ul ol,
.markdown-body ol ul ul,
.markdown-body ul ul ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body {
font-family: "MonoLisa","Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans,
sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 12px;
color: var(--color-text-primary);
line-height: 1.6;
word-wrap: break-word;
padding: 45px;
background: var(--color-bg-primary);
}
.markdown-body > *:first-child {
margin-top: 0 !important;
}
.markdown-body > *:last-child {
margin-bottom: 0 !important;
}
.markdown-body .table-of-contents ol {
list-style: none;
}
.markdown-body .table-of-contents > ol {
padding-left: 0;
}
.markdown-body * {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
}
.markdown-body h1 .anchor,
.markdown-body h2 .anchor,
.markdown-body h3 .anchor,
.markdown-body h4 .anchor,
.markdown-body h5 .anchor,
.markdown-body h6 .anchor {
margin-left: -24px;
visibility: hidden;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
visibility: visible;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body h1 {
margin: 0.67em 0;
padding-bottom: 0.3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid var(--color-border-secondary);
}
.markdown-body h2 {
padding-bottom: 0.3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid var(--color-border-secondary);
}
.markdown-body h3 {
font-size: 1.5em;
line-height: 1.43;
}
.markdown-body h4 {
font-size: 1.25em;
}
.markdown-body h5 {
font-size: 1em;
}
.markdown-body h6 {
font-size: 1em;
color: var(--color-text-tertiary);
}
.markdown-body hr {
margin-top: 20px;
margin-bottom: 20px;
height: 0;
border: 0;
border-top: 1px solid var(--color-border-primary);
}
.markdown-body ol,
.markdown-body ul {
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ol ul,
.markdown-body ul ul {
list-style-type: circle;
}
.markdown-body ol ul ul,
.markdown-body ul ul ul {
list-style-type: square;
}
.markdown-body ol {
list-style-type: decimal;
}
.markdown-body ul {
list-style-type: disc;
}
.markdown-body dl {
margin-bottom: 1.3em;
}
.markdown-body dl dt {
font-weight: 700;
}
.markdown-body dl dd {
margin-left: 0;
}
.markdown-body dl dd p {
margin-bottom: 0.8em;
}
.markdown-body blockquote {
margin-left: 0;
margin-right: 0;
padding: 0 15px;
color: var(--color-text-tertiary);
border-left: 4px solid var(--color-markdown-blockquote-border);
}
.markdown-body table {
display: block;
width: 100%;
overflow: auto;
word-break: normal;
word-break: keep-all;
border-collapse: collapse;
border-spacing: 0;
}
.markdown-body table tr {
background-color: var(--color-bg-primary);
border-top: 1px solid var(--color-markdown-table-tr-border);
}
.markdown-body table tr:nth-child(2n) {
background-color: var(--color-bg-tertiary);
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid var(--color-markdown-table-border);
vertical-align: top;
}
.markdown-body kbd {
display: inline-block;
padding: 5px 6px;
font: 14px SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
line-height: 10px;
color: var(--color-kbd-foreground);
vertical-align: middle;
background-color: var(--color-bg-secondary);
border: 1px solid var(--color-border-tertiary);
border-radius: 3px;
box-shadow: inset 0 -1px 0 var(--color-border-tertiary);
}
.markdown-body pre {
word-wrap: normal;
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: var(--color-bg-tertiary);
-webkit-border-radius: 3px;
border-radius: 3px;
}
.markdown-body pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
font-size: 100%;
line-height: inherit;
word-wrap: normal;
white-space: pre;
border: 0;
-webkit-border-radius: 3px;
border-radius: 3px;
background-color: transparent;
}
.markdown-body pre code:before,
.markdown-body pre code:after {
content: normal;
}
.markdown-body code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
background-color: var(--color-markdown-code-bg);
-webkit-border-radius: 3px;
border-radius: 3px;
}
.markdown-body code:before,
.markdown-body code:after {
letter-spacing: -0.2em;
content: "\00a0";
}
.markdown-body a {
color: var(--color-text-link);
text-decoration: none;
background: transparent;
}
.markdown-body img {
max-width: 100%;
max-height: 100%;
padding: 1rem;
}
.markdown-body strong {
font-weight: bold;
}
.markdown-body em {
font-style: italic;
}
.markdown-body del {
text-decoration: line-through;
}
.task-list-item {
list-style-type: none;
}
.task-list-item input {
font: 13px/1.4 Helvetica, arial, nimbussansl, liberationsans, freesans, clean,
sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
margin: 0 0.35em 0.25em -1.6em;
vertical-align: middle;
}
.task-list-item input[disabled] {
cursor: default;
}
.task-list-item input[type="checkbox"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.task-list-item input[type="radio"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h4 {
clear: both;
}
#page-header {
display: none;
}

View File

@ -1,24 +0,0 @@
================================================================================
INTRODUCTION *kickstart.nvim*
Kickstart.nvim is a project to help you get started on your neovim journey.
*kickstart-is-not*
It is not:
- Complete framework for every plugin under the sun
- Place to add every plugin that could ever be useful
*kickstart-is*
It is:
- Somewhere that has a good start for the most common "IDE" type features:
- autocompletion
- goto-definition
- find references
- fuzzy finding
- and hinting at what more can be done :)
- A place to _kickstart_ your journey.
- You should fork this project and use/modify it so that it matches your
style and preferences. If you don't want to do that, there are probably
other projects that would fit much better for you (and that's great!)!
vim:tw=78:ts=8:ft=help:norl:

View File

@ -59,6 +59,8 @@ require('lazy').setup({
-- Snippet Engine & its associated nvim-cmp source
'L3MON4D3/LuaSnip',
'saadparwaiz1/cmp_luasnip',
'hrsh7th/cmp-path',
'hrsh7th/cmp-buffer',
-- Adds LSP completion capabilities
'hrsh7th/cmp-nvim-lsp',
@ -108,7 +110,7 @@ require('lazy').setup({
-- See `:help lualine.txt`
opts = {
options = {
icons_enabled = false,
icons_enabled = true,
component_separators = '|',
section_separators = '',
},
@ -269,7 +271,7 @@ vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { de
-- See `:help nvim-treesitter`
require('nvim-treesitter.configs').setup {
-- Add languages to be installed here that you want installed for treesitter
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim' },
ensure_installed = { 'c', 'lua', 'python', 'rust', 'vimdoc', 'vim' },
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
auto_install = false,
@ -337,6 +339,18 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnos
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
local sign = function(opts)
vim.fn.sign_define(opts.name, {
texthl = opts.name,
text = opts.text,
numhl = ''
})
end
sign({name = 'DiagnosticSignError', text = ''})
sign({name = 'DiagnosticSignWarn', text = ''})
sign({name = 'DiagnosticSignHint', text = '󱦲'})
sign({name = 'DiagnosticSignInfo', text = '󰙎'})
-- [[ Configure LSP ]]
-- This function gets run when an LSP connects to a particular buffer.
local on_attach = function(_, bufnr)

View File

@ -1,40 +0,0 @@
return{
-- [[ Eyecandy & fancy prgramming stuff ]]
{'tpope/vim-sleuth'}, -- Detect tabstop and shiftwidth automatically
{'matze/vim-move'},
{'windwp/nvim-autopairs',
config = function ()
require('nvim-autopairs').setup()
end
},
{'tpope/vim-surround'},
{'lilydjwg/colorizer'},
{'stevearc/dressing.nvim',
config = function()
require('dressing').setup()
end
},
{"yamatsum/nvim-cursorline",
config = function()
require('nvim-cursorline').setup {
cursorline = {
enable = false,
timeout = 1000,
number = false,
},
cursorword = {
enable = true,
min_length = 2,
hl = { underline = true },
}
}
end
},
}

116
lua/custom/plugins/init.lua Normal file
View File

@ -0,0 +1,116 @@
-- [[ insert your plugins below ]]
return {
-- [[ Null ]]
({'jose-elias-alvarez/null-ls.nvim',
config = function ()
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.formatting.stylua,
null_ls.builtins.diagnostics.eslint,
null_ls.builtins.completion.spell,
},
})
end
}),
-- [[ Eyecandy & fancy prgramming stuff ]]
{'tpope/vim-sleuth'}, -- Detect tabstop and shiftwidth automatically
{'matze/vim-move'},
{'windwp/nvim-autopairs',
config = function ()
require('nvim-autopairs').setup()
end
},
{'tpope/vim-surround'},
{'lilydjwg/colorizer'},
{'stevearc/dressing.nvim',
config = function()
require('dressing').setup()
end
},
{"yamatsum/nvim-cursorline",
config = function()
require('nvim-cursorline').setup {
cursorline = {
enable = false,
timeout = 1000,
number = false,
},
cursorword = {
enable = true,
min_length = 2,
hl = { underline = true },
}
}
end
},
-- [[ Markdown Preview ]]
-- Preview in browser
{
"iamcco/markdown-preview.nvim",
build = "cd app && npm install",
config = function()
vim.g.mkdp_filetypes = { "markdown" }
vim.g.mkdp_page_title = "${name}"
vim.g.mkdp_markdown_css = vim.fn.stdpath("config") .. "/assets/markdown.css"
end,
ft = { "markdown" },
},
-- Table mode
-- https://github.com/dhruvasagar/vim-table-mode
{
"dhruvasagar/vim-table-mode",
ft = { "markdown" },
config = function()
-- Bug: changing prefix doesn't work https://github.com/dhruvasagar/vim-table-mode/issues/222
-- :h table-mode-mappings
-- For Markdown-compatible tables use
vim.g.table_mode_map_prefix = "<localleader>t"
vim.g.table_mode_corner = "|"
-- vim.cmd("let g:table_mode_map_prefix = '<localleader>t'")
-- vim.g.toggle_mode_options_toggle_map = "<localleader>tm"
-- vim.g.table_mode_commands_tableize = "<localleader>tt"
end,
},
-- [[ notes ]]
{"renerocksai/telekasten.nvim",
dependencies = {
{'mzlogin/vim-markdown-toc'},
{'renerocksai/calendar-vim'},
},
config = function()
require('telekasten').setup({
home = vim.fn.expand("~/zettelkasten"), -- Put the name of your notes directory here
})
end
},
-- [[ Zen mode ]]
'folke/zen-mode.nvim',
dependencies = {'folke/twilight.nvim'},
config = function ()
require("zen-mode").setup({
window = {
width = .75, -- width will be 85% of the editor width
options = {
number = false,
relativenumber = false,
},
}
})
end,
}

View File

@ -1,31 +0,0 @@
return {
-- Preview in browser
{
"iamcco/markdown-preview.nvim",
build = "cd app && npm install",
config = function()
vim.g.mkdp_filetypes = { "markdown" }
vim.g.mkdp_page_title = "${name}"
vim.g.mkdp_markdown_css = vim.fn.stdpath("config") .. "/assets/markdown.css"
end,
ft = { "markdown" },
},
-- Table mode
-- https://github.com/dhruvasagar/vim-table-mode
{
"dhruvasagar/vim-table-mode",
ft = { "markdown" },
config = function()
-- Bug: changing prefix doesn't work https://github.com/dhruvasagar/vim-table-mode/issues/222
-- :h table-mode-mappings
vim.g.table_mode_map_prefix = "<localleader>t"
-- vim.cmd("let g:table_mode_map_prefix = '<localleader>t'")
-- vim.g.toggle_mode_options_toggle_map = "<localleader>tm"
-- vim.g.table_mode_commands_tableize = "<localleader>tt"
-- For Markdown-compatible tables use
vim.g.table_mode_corner = "|"
end,
},
}

View File

@ -1,13 +0,0 @@
return {
({"renerocksai/telekasten.nvim",
dependencies = {
{'mzlogin/vim-markdown-toc'},
{'renerocksai/calendar-vim'},
},
config = function()
require('telekasten').setup({
home = vim.fn.expand("~/zettelkasten"), -- Put the name of your notes directory here
})
end
}),
}

View File

@ -1,16 +0,0 @@
return {
{'folke/zen-mode.nvim',
dependencies = {'folke/twilight.nvim'},
config = function ()
require("zen-mode").setup({
window = {
width = .75, -- width will be 85% of the editor width
options = {
number = false,
relativenumber = false,
},
}
})
end
},
}

View File

@ -107,7 +107,6 @@ map("n", "<leader>md", ":MarkdownPreview<CR>", opts)
map("n", "<leader>doc", ":silent ! pandoc % --pdf-engine=xelatex --template eisvogel.tex -o %.pdf<CR>", opts)
map("n", "<leader>zz", ":ZenMode<CR>", opts)
map("n", "<leader>qw", ":MindOpenMain<CR>", opts)
--
-- open my main notes file
if os == "Windows_NT" then
@ -121,15 +120,12 @@ end
map("n", "<C-S>", ":%s/\\<<C-r><C-w>\\>//gI<Left><Left><Left>", opts)
map("v", "<", "<gv", opts)
map("v", ">", ">gv", opts)
-- map('i', '<C-c', '<Esc>', opts)
map("n", "<leader>x", ":MkdnToggleToDo<CR>", opts)
map("n", "<leader>ps", ":PackerSync<CR>", opts)
map("n", "<M-x>", ":!", opts) -- Meta X like emacs. This is blasphemy....
map("n", "<leader>hrr", ":so%<CR>", opts)
map("n", "<leder>hrr", ":so%<CR>", opts)
map("n", "<C-n>", ":enew<CR>", opts)
map("i", "jk", "<Esc>l", opts)
map("i", "jj", "<Esc>l", opts)
map("i", "aa", "<Esc>A", opts)
map("i", "qw", "<Esc>$", opts)
map("n", "cw", "ciw", opts)
map("n", "vw", "viw", opts)