Changed dot-config to .config
This commit is contained in:
parent
9ea93f8144
commit
0ab0f24015
118 changed files with 29 additions and 980 deletions
1
nvim/.config/nvim
Submodule
1
nvim/.config/nvim
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 92bd99d8ea9e924868905154c58ed1839c8b6c27
|
||||
2
nvim/dot-config/nvim/.gitignore
vendored
2
nvim/dot-config/nvim/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
/plugin/
|
||||
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
vim.opt.tabstop = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
vim.opt.tabstop = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
vim.opt.tabstop = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
|
||||
|
|
@ -1,207 +0,0 @@
|
|||
local palette = {
|
||||
none = "NONE",
|
||||
fg = "#E1E1E1",
|
||||
bg = "#151515",
|
||||
alt_bg = "#171717",
|
||||
accent = "#202020",
|
||||
white = "#E1E1E1",
|
||||
gray = "#373737",
|
||||
medium_gray = "#727272",
|
||||
light_gray = "#AFAFAF",
|
||||
blue = "#BAD7FF",
|
||||
gray_blue = "#7E97AB",
|
||||
medium_gray_blue = "#A2B5C1",
|
||||
cyan = "#88afa2",
|
||||
red = "#b46958",
|
||||
green = "#90A959",
|
||||
yellow = "#F4BF75",
|
||||
orange = "#FFA557",
|
||||
purple = "#AA749F",
|
||||
magenta = "#AA759F",
|
||||
cursor_fg = "#151515",
|
||||
cursor_bg = "#D0D0D0",
|
||||
sign_add = "#586935",
|
||||
sign_change = "#51657B",
|
||||
sign_delete = "#984936",
|
||||
error = "#984936",
|
||||
warning = "#ab8550",
|
||||
info = "#ab8550",
|
||||
hint = "#576f82",
|
||||
neogit_light_green = "#2A2E19",
|
||||
neogit_blue = "#1B1F27",
|
||||
neogit_green = "#212513",
|
||||
neogit_light_red = "#402020",
|
||||
neogit_red = "#351D1D",
|
||||
}
|
||||
|
||||
require("no-clown-fiesta").setup({
|
||||
transparent = true,
|
||||
})
|
||||
|
||||
require('rose-pine').setup({
|
||||
--- @usage 'auto'|'main'|'moon'|'dawn'
|
||||
variant = 'auto',
|
||||
--- @usage 'main'|'moon'|'dawn'
|
||||
dark_variant = 'main',
|
||||
bold_vert_split = false,
|
||||
dim_nc_background = false,
|
||||
disable_background = true,
|
||||
disable_float_background = false,
|
||||
disable_italics = true,
|
||||
|
||||
--- @usage string hex value or named color from rosepinetheme.com/palette
|
||||
groups = {
|
||||
background = 'base',
|
||||
background_nc = '_experimental_nc',
|
||||
panel = 'surface',
|
||||
panel_nc = 'base',
|
||||
border = 'highlight_med',
|
||||
comment = 'muted',
|
||||
link = 'iris',
|
||||
punctuation = 'subtle',
|
||||
|
||||
error = 'love',
|
||||
hint = 'iris',
|
||||
info = 'foam',
|
||||
warn = 'gold',
|
||||
|
||||
headings = {
|
||||
h1 = 'iris',
|
||||
h2 = 'foam',
|
||||
h3 = 'rose',
|
||||
h4 = 'gold',
|
||||
h5 = 'pine',
|
||||
h6 = 'foam',
|
||||
}
|
||||
-- or set all headings at once
|
||||
-- headings = 'subtle'
|
||||
},
|
||||
|
||||
-- Change specific vim highlight groups
|
||||
-- https://github.com/rose-pine/neovim/wiki/Recipes
|
||||
highlight_groups = {
|
||||
ColorColumn = { bg = 'rose' },
|
||||
|
||||
-- Blend colours against the "base" background
|
||||
CursorLine = { bg = 'foam', blend = 10 },
|
||||
StatusLine = { fg = 'love', bg = 'love', blend = 10 },
|
||||
|
||||
-- By default each group adds to the existing config.
|
||||
-- If you only want to set what is written in this config exactly,
|
||||
-- you can set the inherit option:
|
||||
Search = { bg = 'gold', inherit = false },
|
||||
}
|
||||
})
|
||||
|
||||
require("gruvbox").setup({
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
bold = true,
|
||||
italic = {
|
||||
strings = true,
|
||||
comments = true,
|
||||
operators = false,
|
||||
folds = true,
|
||||
},
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
invert_intend_guides = false,
|
||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||
contrast = "", -- can be "hard", "soft" or empty string
|
||||
palette_overrides = {},
|
||||
overrides = {},
|
||||
dim_inactive = false,
|
||||
transparent_mode = true,
|
||||
})
|
||||
|
||||
local c = require('vscode.colors').get_colors()
|
||||
require('vscode').setup({
|
||||
-- Alternatively set style in setup
|
||||
-- style = 'light'
|
||||
|
||||
-- Enable transparent background
|
||||
transparent = true,
|
||||
|
||||
-- Enable italic comment
|
||||
italic_comments = true,
|
||||
|
||||
-- Disable nvim-tree background color
|
||||
disable_nvimtree_bg = true,
|
||||
|
||||
-- Override colors (see ./lua/vscode/colors.lua)
|
||||
color_overrides = {
|
||||
-- vscLineNumber = '#FFFFFF',
|
||||
},
|
||||
|
||||
-- Override highlight groups (see ./lua/vscode/theme.lua)
|
||||
group_overrides = {
|
||||
-- this supports the same val table as vim.api.nvim_set_hl
|
||||
-- use colors from this colorscheme by requiring vscode.colors!
|
||||
Cursor = { fg=c.vscDarkBlue, bg=c.vscLightGreen, bold=true },
|
||||
}
|
||||
})
|
||||
|
||||
vim.cmd[[
|
||||
let s:base03 = [ '#151513', 233 ]
|
||||
let s:base02 = [ '#202020', 236 ]
|
||||
let s:base01 = [ '#373737', 239 ]
|
||||
let s:base00 = [ '#727272', 242 ]
|
||||
let s:base0 = [ '#808070', 244 ]
|
||||
let s:base1 = [ '#949484', 246 ]
|
||||
let s:base2 = [ '#a8a897', 248 ]
|
||||
let s:base3 = [ '#E1E1E1', 253 ]
|
||||
let s:yellow = [ '#F4BF75', 3 ]
|
||||
let s:orange = [ '#FFA557', 216 ]
|
||||
let s:red = [ '#B46958', 131 ]
|
||||
let s:purple = [ '#AA749F', 181 ]
|
||||
let s:blue = [ '#7E97AB', 109 ]
|
||||
let s:cyan = [ '#BAD7FF', 23 ]
|
||||
let s:green = [ '#90A959', 108 ]
|
||||
let s:white = [ '#AFAFAF', 252 ]
|
||||
|
||||
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}
|
||||
let s:p.normal.left = [ [ s:base02, s:green ], [ s:base3, s:base01 ] ]
|
||||
let s:p.normal.right = [ [ s:base02, s:base1 ], [ s:base2, s:base01 ] ]
|
||||
let s:p.inactive.right = [ [ s:base02, s:base00 ], [ s:base0, s:base02 ] ]
|
||||
let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base02 ] ]
|
||||
let s:p.insert.left = [ [ s:base02, s:blue ], [ s:base3, s:base01 ] ]
|
||||
let s:p.replace.left = [ [ s:base02, s:purple ], [ s:base3, s:base01 ] ]
|
||||
let s:p.visual.left = [ [ s:base02, s:red ], [ s:base3, s:base01 ] ]
|
||||
let s:p.normal.middle = [ [ s:base0, s:base02 ] ]
|
||||
let s:p.inactive.middle = [ [ s:base00, s:base02 ] ]
|
||||
let s:p.tabline.left = [ [ s:base3, s:base00 ] ]
|
||||
let s:p.tabline.tabsel = [ [ s:base3, s:base02 ] ]
|
||||
let s:p.tabline.middle = [ [ s:base01, s:base1 ] ]
|
||||
let s:p.tabline.right = copy(s:p.normal.right)
|
||||
let s:p.normal.error = [ [ s:red, s:base02 ] ]
|
||||
let s:p.normal.warning = [ [ s:yellow, s:base01 ] ]
|
||||
|
||||
let g:lightline#colorscheme#mycolors#palette = lightline#colorscheme#flatten(s:p)
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'mycolors',
|
||||
\ }
|
||||
|
||||
" Don't need to see mode if lightline is installed
|
||||
set noshowmode
|
||||
]]
|
||||
|
||||
vim.cmd[[colorscheme no-clown-fiesta]]
|
||||
|
||||
-- My own color overrides
|
||||
local hl = vim.api.nvim_set_hl
|
||||
hl(0, 'TSConstant', { fg = palette.yellow })
|
||||
hl(0, 'EndOfBuffer', { fg = palette.medium_gray })
|
||||
hl(0, 'ErrorMsg', { fg = palette.yellow })
|
||||
hl(0, 'LineNr', { fg = palette.medium_gray })
|
||||
hl(0, 'MasonNormal', { bg = palette.gray })
|
||||
hl(0, 'NvimTreeCursorLine', { fg = palette.yellow })
|
||||
hl(0, 'NvimTreeEndOfBuffer', { fg = palette.medium_gray })
|
||||
hl(0, 'NvimTreeIndentMarker', { fg = palette.medium_gray })
|
||||
hl(0, 'NvimTreeFolderIcon', { fg = palette.yellow })
|
||||
hl(0, 'WhichKeyFloat', { bg = nil })
|
||||
hl(0, 'WhichKeyDesc', { link = "function" })
|
||||
hl(0, 'WhichKey', { fg = palette.medium_gray_blue })
|
||||
hl(0, 'WhichKeyGroup', { fg = palette.gray_blue, bold = true })
|
||||
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
require("Comment").setup()
|
||||
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<C-_>",
|
||||
function() require("Comment.api").toggle.linewise.current() end,
|
||||
{ noremap = true, silent = true }
|
||||
)
|
||||
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
local alpha = require("alpha")
|
||||
local dashboard = require("alpha.themes.dashboard")
|
||||
|
||||
math.randomseed(os.time())
|
||||
|
||||
local function pick_color()
|
||||
local colors = {"String", "Identifier", "Keyword", "Number"}
|
||||
return colors[math.random(#colors)]
|
||||
end
|
||||
|
||||
local function footer()
|
||||
local total_plugins = #vim.tbl_keys(packer_plugins)
|
||||
local version = vim.version()
|
||||
local nvim_version_info = " NVIM v" .. version.major .. "." .. version.minor .. "." .. version.patch
|
||||
|
||||
return nvim_version_info .. " " .. total_plugins .. " plugins"
|
||||
end
|
||||
|
||||
-- Set header
|
||||
dashboard.section.header.val = {
|
||||
" ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣭⣿⣶⣿⣦⣼⣆ ",
|
||||
" ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ",
|
||||
" ⠈ ⠈⢿⣿⣟⠦⠄⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ",
|
||||
" ⣸⣿⣿⢧⠄⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ",
|
||||
" ⢠⣿⣿⣿⠈ ⠡⠌⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ",
|
||||
" ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿ ",
|
||||
" ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷⠄ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ",
|
||||
"⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ",
|
||||
"⠙⠃ ⣼⣿⡟⠌ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿⠐⣿⣿⡇ ⠛⠻⢷⣄",
|
||||
" ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ⠁",
|
||||
" ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣀⣤⣾⡿⠃ ",
|
||||
"⢀⣀⠀⣠⣀⣠⣾⣿⣿⡿⠛⠋⠉⠉⠉ ⠉⠉⠉⠉⠛⠻⣿⣿⣷⣄⣀⢿⡽⢻⣦",
|
||||
"⠻⠶⠾⠿⠿⠿⠋⠉ N E O V I M ⠉⠻⠿⠿⠿⠿⠿⠋",
|
||||
}
|
||||
|
||||
-- Set menu
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button( "e", " New file" , ":ene <BAR> startinsert <CR>"),
|
||||
dashboard.button( "q", " Quit NVIM", ":qa<CR>"),
|
||||
}
|
||||
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
once = true,
|
||||
callback = function()
|
||||
math.randomseed(os.time())
|
||||
local fg_color = tostring(math.random(0, 12))
|
||||
local hi_setter = "hi AlphaHeader ctermfg="
|
||||
vim.cmd(hi_setter .. fg_color)
|
||||
end
|
||||
})
|
||||
|
||||
dashboard.section.footer.val = footer()
|
||||
|
||||
dashboard.section.header.opts.hl = "Include"
|
||||
dashboard.section.footer.opts.hl = "String"
|
||||
|
||||
alpha.setup(dashboard.opts)
|
||||
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
vim.g.firenvim_config = {
|
||||
globalSettings = { alt = "all" },
|
||||
localSettings = {
|
||||
[".*"] = {
|
||||
cmdline = "neovim",
|
||||
content = "text",
|
||||
priority = 0,
|
||||
selector = "textarea",
|
||||
takeover = "never"
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
-- Prevents scrolling when cursor is near the bottom of the text area
|
||||
if vim.g.started_by_firenvim == true then
|
||||
vim.opt.scrolloff = 0
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd({'BufEnter'}, {
|
||||
pattern = "localhost_*.txt",
|
||||
command = "set filetype=python"
|
||||
})
|
||||
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
local wk = require("which-key")
|
||||
|
||||
wk.register({g = { name = "git" }, prefix = "<leader>"})
|
||||
vim.keymap.set("n", "<leader>gs", vim.cmd.Git, { desc = "Git status" })
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
-- vim.keymap.set("n", "<leader>e", function ()
|
||||
-- vim.cmd("Lf")
|
||||
-- end)
|
||||
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
-- LANGUAGE SERVERS
|
||||
local lsp_zero = require('lsp-zero')
|
||||
local lspconfig = require("lspconfig")
|
||||
local lsp_capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
lsp_zero.on_attach(function(client, bufnr)
|
||||
-- see :help lsp-zero-keybindings
|
||||
-- to learn the available actions
|
||||
lsp_zero.default_keymaps({buffer = bufnr})
|
||||
end)
|
||||
|
||||
-- LUA
|
||||
lspconfig.lua_ls.setup({
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
-- Making sure that lua recognizes the global variable 'vim'
|
||||
globals = { 'vim', 'xplr' },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- RUST
|
||||
-- Must run `rustup default stable` and then `rustup component add rust-analyzer`
|
||||
-- upon first install
|
||||
lspconfig.rust_analyzer.setup({})
|
||||
|
||||
lspconfig.clangd.setup({
|
||||
capabilities = lsp_capabilities,
|
||||
})
|
||||
|
||||
-- AUTOCOMPLETION
|
||||
|
||||
local cmp = require('cmp')
|
||||
local cmp_action = require('lsp-zero').cmp_action()
|
||||
|
||||
cmp.setup({
|
||||
sources = {
|
||||
{ name = "luasnip", option = { show_autosnippets = true } },
|
||||
{ name = "nvim_lua" },
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "path" }, -- Auto complete paths
|
||||
},
|
||||
mapping = {
|
||||
-- Navigate between completion item
|
||||
['<M-k>'] = cmp.mapping.select_prev_item(),
|
||||
['<M-j>'] = cmp.mapping.select_next_item(),
|
||||
|
||||
-- toggle completion
|
||||
['<M-u>'] = cmp_action.toggle_completion(),
|
||||
|
||||
-- navigate between snippet placeholder
|
||||
['<C-a>'] = cmp_action.luasnip_jump_backward(),
|
||||
['<C-d>'] = cmp_action.luasnip_jump_forward(),
|
||||
|
||||
-- Confirm item
|
||||
['<Tab>'] = cmp.mapping.confirm({select = true}),
|
||||
}
|
||||
})
|
||||
|
||||
-- DIAGNOSTICS
|
||||
|
||||
-- Show all diagnostics on current line in floating window
|
||||
vim.api.nvim_set_keymap(
|
||||
'n', 'gl', ':lua vim.diagnostic.open_float()<CR>',
|
||||
{ noremap = true, silent = true }
|
||||
)
|
||||
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
vim.keymap.set("n", "<leader>mp", "<Plug>MarkdownPreview",
|
||||
{ desc = "Markdown prewview" })
|
||||
|
||||
vim.cmd([[
|
||||
|
||||
" set to 1, nvim will open the preview window after entering the markdown buffer
|
||||
" default: 0
|
||||
let g:mkdp_auto_start = 0
|
||||
|
||||
" set to 1, the nvim will auto close current preview window when change
|
||||
" from markdown buffer to another buffer
|
||||
" default: 1
|
||||
let g:mkdp_auto_close = 1
|
||||
|
||||
" set to 1, the vim will refresh markdown when save the buffer or
|
||||
" leave from insert mode, default 0 is auto refresh markdown as you edit or
|
||||
" move the cursor
|
||||
" default: 0
|
||||
let g:mkdp_refresh_slow = 0
|
||||
|
||||
" set to 1, the MarkdownPreview command can be use for all files,
|
||||
" by default it can be use in markdown file
|
||||
" default: 0
|
||||
let g:mkdp_command_for_global = 0
|
||||
|
||||
" set to 1, preview server available to others in your network
|
||||
" by default, the server listens on localhost (127.0.0.1)
|
||||
" default: 0
|
||||
let g:mkdp_open_to_the_world = 0
|
||||
|
||||
" use custom IP to open preview page
|
||||
" useful when you work in remote vim and preview on local browser
|
||||
" more detail see: https://github.com/iamcco/markdown-preview.nvim/pull/9
|
||||
" default empty
|
||||
let g:mkdp_open_ip = ''
|
||||
|
||||
" specify browser to open preview page
|
||||
" for path with space
|
||||
" valid: `/path/with\ space/xxx`
|
||||
" invalid: `/path/with\\ space/xxx`
|
||||
" default: ''
|
||||
let g:mkdp_browser = 'thorium-browser'
|
||||
|
||||
" set to 1, echo preview page url in command line when open preview page
|
||||
" default is 0
|
||||
let g:mkdp_echo_preview_url = 0
|
||||
|
||||
" a custom vim function name to open preview page
|
||||
" this function will receive url as param
|
||||
" default is empty
|
||||
let g:mkdp_browserfunc = ''
|
||||
|
||||
" options for markdown render
|
||||
" mkit: markdown-it options for render
|
||||
" katex: katex options for math
|
||||
" uml: markdown-it-plantuml options
|
||||
" maid: mermaid options
|
||||
" disable_sync_scroll: if disable sync scroll, default 0
|
||||
" sync_scroll_type: 'middle', 'top' or 'relative', default value is 'middle'
|
||||
" middle: mean the cursor position alway show at the middle of the preview page
|
||||
" top: mean the vim top viewport alway show at the top of the preview page
|
||||
" relative: mean the cursor position alway show at the relative positon of the preview page
|
||||
" hide_yaml_meta: if hide yaml metadata, default is 1
|
||||
" sequence_diagrams: js-sequence-diagrams options
|
||||
" content_editable: if enable content editable for preview page, default: v:false
|
||||
" disable_filename: if disable filename header for preview page, default: 0
|
||||
let g:mkdp_preview_options = {
|
||||
\ 'mkit': {},
|
||||
\ 'katex': {},
|
||||
\ 'uml': {},
|
||||
\ 'maid': {},
|
||||
\ 'disable_sync_scroll': 0,
|
||||
\ 'sync_scroll_type': 'middle',
|
||||
\ 'hide_yaml_meta': 1,
|
||||
\ 'sequence_diagrams': {},
|
||||
\ 'flowchart_diagrams': {},
|
||||
\ 'content_editable': v:false,
|
||||
\ 'disable_filename': 0,
|
||||
\ 'toc': {}
|
||||
\ }
|
||||
|
||||
" use a custom markdown style must be absolute path
|
||||
" like '/Users/username/markdown.css' or expand('~/markdown.css')
|
||||
let g:mkdp_markdown_css = '~/.local/share/github-markdown-dark.css'
|
||||
|
||||
" use a custom highlight style must absolute path
|
||||
" like '/Users/username/highlight.css' or expand('~/highlight.css')
|
||||
let g:mkdp_highlight_css = ''
|
||||
|
||||
" use a custom port to start server or empty for random
|
||||
let g:mkdp_port = ''
|
||||
|
||||
" preview page title
|
||||
" ${name} will be replace with the file name
|
||||
let g:mkdp_page_title = '「${name}」'
|
||||
|
||||
" recognized filetypes
|
||||
" these filetypes will have MarkdownPreview... commands
|
||||
let g:mkdp_filetypes = ['markdown']
|
||||
|
||||
" set default theme (dark or light)
|
||||
" By default the theme is define according to the preferences of the system
|
||||
let g:mkdp_theme = 'dark'
|
||||
|
||||
]])
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
-- set termguicolors to enable highlight groups
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
require("nvim-tree").setup()
|
||||
|
||||
vim.keymap.set("n", "<leader>pt", vim.cmd.NvimTreeToggle)
|
||||
|
||||
-- sets transparent background
|
||||
vim.cmd[[hi NvimTreeNormal guibg=NONE ctermbg=NONE]]
|
||||
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
local builtin = require("telescope.builtin")
|
||||
|
||||
require("telescope").setup{
|
||||
defaults = {
|
||||
file_ignore_patterns = { ".git\\", ".pyc", ".mypy_cache\\", "node_modules\\", ".svg" }
|
||||
}
|
||||
}
|
||||
|
||||
local wk = require("which-key")
|
||||
|
||||
-- <leader> p
|
||||
wk.register({p = { name = "project" }, prefix = "<leader>"})
|
||||
vim.keymap.set("n", "<leader>pf", builtin.find_files, {desc = "Project find"})
|
||||
vim.keymap.set("n", "<leader>ps", function ()
|
||||
builtin.grep_string({ search = vim.fn.input("Grep > ") })
|
||||
end , {desc = "Project search"})
|
||||
|
||||
-- <leader> f
|
||||
wk.register({f = { name = "find" }, prefix = "<leader>"})
|
||||
vim.keymap.set("n", "<leader>fr", builtin.oldfiles, { desc = "Find recent" })
|
||||
|
||||
-- <leader> h
|
||||
wk.register({h = { name = "help" }, prefix = "<leader>"})
|
||||
vim.keymap.set("n", "<leader>ht", builtin.colorscheme, { desc = "Load theme" })
|
||||
vim.keymap.set("n", "<leader>hf", builtin.commands , { desc = "Describe function" })
|
||||
vim.keymap.set("n", "<leader>hk", builtin.keymaps , { desc = "Describe key" })
|
||||
vim.keymap.set("n", "<leader>hv", builtin.vim_options, { desc = "Describe key" })
|
||||
vim.keymap.set("n", "<leader>hh", builtin.help_tags , { desc = "Search local wiki" })
|
||||
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = { "rust", "vim", "javascript", "html", "css", "python", "java", "lua", "perl", "php", "c", "json" },
|
||||
|
||||
ignore_install = { "latex", "markdown", "htmldjango" },
|
||||
|
||||
sync_install = false,
|
||||
|
||||
auto_install = false,
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
|
||||
addition_vim_regex_highlighting = false,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
vim.keymap.set("n", "<leader>ut", vim.cmd.UndotreeToggle)
|
||||
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
vim.cmd([[
|
||||
|
||||
syntax enable
|
||||
|
||||
let g:maplocalleader=' '
|
||||
let g:vimtex_view_method='zathura'
|
||||
let g:tex_flavor='latex'
|
||||
let g:vimtex_quickfix_mode=0
|
||||
set conceallevel=0
|
||||
let g:tex_conceal='abdmg'
|
||||
let g:vimtex_view_forward_search_on_start=0 " Weird highlighting otherwise
|
||||
|
||||
augroup vimtex_config
|
||||
au!
|
||||
au User VimtexEventQuit call vimtex#compiler#clean(0)
|
||||
augroup END
|
||||
|
||||
]])
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
require("which-key").setup({
|
||||
window = {
|
||||
border = "single", -- none, single, double, shadow
|
||||
position = "bottom", -- bottom, top
|
||||
margin = { 0, 0, 0, 0 }, -- extra window margin [top, right, bottom, left]. When between 0 and 1, will be treated as a percentage of the screen size.
|
||||
padding = { 0, 2, 0, 2 }, -- extra window padding [top, right, bottom, left]
|
||||
winblend = 0, -- value between 0-100 0 for fully opaque and 100 for fully transparent
|
||||
zindex = 1000, -- positive value to position WhichKey above other floating windows.
|
||||
},
|
||||
layout = {
|
||||
height = { min = 4, max = 25 }, -- min and max height of the columns
|
||||
width = { min = 20, max = 50 }, -- min and max width of the columns
|
||||
spacing = 3, -- spacing between columns
|
||||
align = "left", -- align columns left, center or right
|
||||
},
|
||||
})
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
vim.keymap.set("n", "<leader>e", function ()
|
||||
vim.cmd("Yazi")
|
||||
end)
|
||||
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
require('zen-mode').setup {
|
||||
window = {
|
||||
backdrop = 0.95, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
|
||||
-- height and width can be:
|
||||
-- * an absolute number of cells when > 1
|
||||
-- * a percentage of the width / height of the editor when <= 1
|
||||
-- * a function that returns the width or the height
|
||||
width = 120, -- width of the Zen window
|
||||
height = 1, -- height of the Zen window
|
||||
-- by default, no options are changed for the Zen window
|
||||
-- uncomment any of the options below, or add other vim.wo options you want to apply
|
||||
options = {
|
||||
signcolumn = "no", -- disable signcolumn
|
||||
number = false, -- disable number column
|
||||
relativenumber = false, -- disable relative numbers
|
||||
cursorline = false, -- disable cursorline
|
||||
cursorcolumn = false, -- disable cursor column
|
||||
foldcolumn = "0", -- disable fold column
|
||||
-- list = false, -- disable whitespace characters
|
||||
},
|
||||
},
|
||||
plugins = {
|
||||
-- disable some global vim options (vim.o...)
|
||||
-- comment the lines to not apply the options
|
||||
options = {
|
||||
enabled = true,
|
||||
ruler = false, -- disables the ruler text in the cmd line area
|
||||
showcmd = false, -- disables the command in the last line of the screen
|
||||
},
|
||||
twilight = { enabled = true }, -- enable to start Twilight when zen mode opens
|
||||
gitsigns = { enabled = false }, -- disables git signs
|
||||
tmux = { enabled = false }, -- disables the tmux statusline
|
||||
-- this will change the font size on kitty when in zen mode
|
||||
-- to make this work, you need to set the following kitty options:
|
||||
-- - allow_remote_control socket-only
|
||||
-- - listen_on unix:/tmp/kitty
|
||||
kitty = {
|
||||
enabled = false,
|
||||
font = "+4", -- font size increment
|
||||
},
|
||||
-- this will change the font size on alacritty when in zen mode
|
||||
-- requires Alacritty Version 0.10.0 or higher
|
||||
-- uses `alacritty msg` subcommand to change font size
|
||||
alacritty = {
|
||||
enabled = false,
|
||||
font = "14", -- font size
|
||||
},
|
||||
-- this will change the font size on wezterm when in zen mode
|
||||
-- See alse also the Plugins/Wezterm section in this projects README
|
||||
wezterm = {
|
||||
enabled = false,
|
||||
-- can be either an absolute font size or the number of incremental steps
|
||||
font = "+4", -- (10% increase per step)
|
||||
},
|
||||
},
|
||||
-- callback where you can add custom code when the Zen window opens
|
||||
on_open = function(win)
|
||||
end,
|
||||
-- callback where you can add custom code when the Zen window closes
|
||||
on_close = function()
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
syntax case ignore
|
||||
|
||||
" Match regexes.
|
||||
syntax match lc3Label /[A-Za-z_][A-Za-z0-9_]*/
|
||||
syntax match lc3Register /[rR][0-7]/
|
||||
syntax match lc3Decimal /#\=-\=\<[0-9]\+\>/
|
||||
syntax match lc3Hex /x-\=[A-Fa-f0-9]\+/
|
||||
syntax match lc3Binary /b-\=[01]\+/
|
||||
syntax region lc3String start=+"+ skip=+\\"+ end=+"+
|
||||
syntax region lc3Comment start=+;+ end=+$+
|
||||
|
||||
" Assembler directives/pseudo-ops
|
||||
syntax match lc3Directive /\.orig/
|
||||
syntax match lc3Directive /\.end/
|
||||
syntax match lc3Directive /\.fill/
|
||||
syntax match lc3Directive /\.blkw/
|
||||
syntax match lc3Directive /\.stringz/
|
||||
|
||||
" LC-3 opcodes/aliases, minus branches
|
||||
syntax keyword lc3Opcode add ld st jsrr jsr and ldr str rti not ldi sti jmp ret lea trap nop
|
||||
" Branches
|
||||
syntax keyword lc3Opcode br brn brz brp brnz brnp brzp brnzp
|
||||
" Trap subroutines
|
||||
syntax keyword lc3Opcode getc out puts in putsp halt
|
||||
" LC-3b opcodes
|
||||
syntax keyword lc3Opcode ldb ldw lshf rshfl rshfa stb stw xor
|
||||
|
||||
" Link colors.
|
||||
hi def link lc3Opcode Statement
|
||||
hi def link lc3Label Identifier
|
||||
hi def link lc3Register Type
|
||||
hi def link lc3Directive Define
|
||||
hi def link lc3Decimal Number
|
||||
hi def link lc3Hex Number
|
||||
hi def link lc3Binary Number
|
||||
hi def link lc3String String
|
||||
hi def link lc3Comment Comment
|
||||
|
||||
let b:current_syntax = "asm"
|
||||
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
|
||||
syn include @Vim $VIMRUNTIME/syntax/vim.vim
|
||||
syn region embedvim matchgroup=luaEmbedError start="vim\.api\.nvim_command(\[\[" end="\]\])" keepend contains=@Vim
|
||||
syn region embedvim matchgroup=luaEmbedError start="vim\.api\.nvim_command \[\[" end="\]\]" keepend contains=@Vim
|
||||
syn region embedvim matchgroup=luaEmbedError start="vim\.api\.nvim_exec(\[\[" end="\]\])" keepend contains=@Vim
|
||||
syn region embedvim matchgroup=luaEmbedError start="vim\.api\.nvim_exec \[\[" end="\]\]" keepend contains=@Vim
|
||||
syn region embedvim matchgroup=luaEmbedError start="vim\.cmd \[\[" end="\]\]" keepend contains=@Vim
|
||||
syn region embedvim matchgroup=luaEmbedError start="vim\.cmd(\[\[" end="\]\])" keepend contains=@Vim
|
||||
syn region embedvim matchgroup=luaEmbedError start="vim\.cmd \"" end="\"" keepend contains=@Vim
|
||||
syn region embedvim matchgroup=luaEmbedError start="vim\.cmd(\"" end="\")" keepend contains=@Vim
|
||||
syn region embedvim matchgroup=luaEmbedError start="vim\.cmd '" end="'" keepend contains=@Vim
|
||||
syn region embedvim matchgroup=luaEmbedError start="vim\.cmd('" end="')" keepend contains=@Vim
|
||||
|
||||
let b:current_syntax = 'lua'
|
||||
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
require("andrew")
|
||||
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
require("andrew.remap")
|
||||
require("andrew.packer")
|
||||
require("andrew.set")
|
||||
|
||||
|
|
@ -1,137 +0,0 @@
|
|||
local ensure_packer = function()
|
||||
local fn = vim.fn
|
||||
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
local packer_bootstrap = ensure_packer()
|
||||
|
||||
return require("packer").startup(function(use)
|
||||
use "goolord/alpha-nvim"
|
||||
|
||||
use "wbthomason/packer.nvim"
|
||||
|
||||
use "DreamMaoMao/yazi.nvim"
|
||||
|
||||
use "whonore/Coqtail"
|
||||
|
||||
use {
|
||||
"folke/which-key.nvim",
|
||||
config = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
end
|
||||
}
|
||||
|
||||
-- File manager in nvim
|
||||
use {
|
||||
"ptzz/lf.vim",
|
||||
requires = { {"voldikss/vim-floaterm"} },
|
||||
}
|
||||
vim.cmd("let g:lf_map_keys = 0") -- Need to put here or else doesn't work
|
||||
|
||||
-- Zen mode
|
||||
use "folke/zen-mode.nvim"
|
||||
|
||||
-- Find files and strings
|
||||
use {
|
||||
"nvim-telescope/telescope.nvim", tag = "0.1.4",
|
||||
requires = { {"nvim-lua/plenary.nvim"} }
|
||||
}
|
||||
|
||||
-- Treesitter
|
||||
use({"nvim-treesitter/nvim-treesitter", run = ":TSUpdate"})
|
||||
|
||||
-- Themes
|
||||
use "aktersnurra/no-clown-fiesta.nvim"
|
||||
use "ellisonleao/gruvbox.nvim"
|
||||
use { 'rose-pine/neovim', as = 'rose-pine' }
|
||||
use 'Mofiqul/vscode.nvim'
|
||||
|
||||
-- Referencing a hex code highlights it in that color
|
||||
use "norcalli/nvim-colorizer.lua"
|
||||
|
||||
-- Relative line numbers disappear when not actively in buffer
|
||||
use "jeffkreeftmeijer/vim-numbertoggle"
|
||||
|
||||
-- History visualizer
|
||||
use "mbbill/undotree"
|
||||
|
||||
-- See function signatures when typing them
|
||||
use "ray-x/lsp_signature.nvim"
|
||||
require "lsp_signature".setup({})
|
||||
|
||||
-- Left-side file tree dispaly
|
||||
use {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
requires = {
|
||||
"nvim-tree/nvim-web-devicons", -- for file icons
|
||||
},
|
||||
tag = "nightly" -- optional, updated every week
|
||||
}
|
||||
|
||||
-- Shows current mode on bottom of screen
|
||||
use "itchyny/lightline.vim"
|
||||
|
||||
-- LSP
|
||||
use {
|
||||
'VonHeikemen/lsp-zero.nvim',
|
||||
branch = 'v3.x',
|
||||
requires = {
|
||||
-- LSP Support
|
||||
{'neovim/nvim-lspconfig'}, -- Required
|
||||
|
||||
-- Autocompletion
|
||||
{'hrsh7th/nvim-cmp'}, -- Required
|
||||
{'hrsh7th/cmp-nvim-lsp'}, -- Required
|
||||
{'hrsh7th/cmp-buffer'}, -- Optional
|
||||
{'hrsh7th/cmp-path'}, -- Optional
|
||||
{'saadparwaiz1/cmp_luasnip'}, -- Optional
|
||||
{'hrsh7th/cmp-nvim-lua'}, -- Optional
|
||||
|
||||
-- Snippets
|
||||
{'L3MON4D3/LuaSnip'}, -- Required
|
||||
{'rafamadriz/friendly-snippets'}, -- Optional
|
||||
}
|
||||
}
|
||||
|
||||
-- Better diagnostics
|
||||
use {
|
||||
"folke/trouble.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
}
|
||||
|
||||
-- Linting
|
||||
use "jose-elias-alvarez/null-ls.nvim"
|
||||
|
||||
-- Git wrapper
|
||||
use("tpope/vim-fugitive")
|
||||
|
||||
-- Latex editing in vim
|
||||
use "lervag/vimtex"
|
||||
|
||||
-- Auto comment
|
||||
use "numToStr/Comment.nvim"
|
||||
|
||||
-- Markdown
|
||||
use({
|
||||
"agryphus/markdown-preview.nvim",
|
||||
run = function() vim.fn["mkdp#util#install"]() end,
|
||||
})
|
||||
|
||||
-- Jupyter notebook integration
|
||||
-- use {
|
||||
-- "glacambre/firenvim",
|
||||
-- run = function() vim.fn["firenvim#install"](0) end
|
||||
-- }
|
||||
|
||||
if packer_bootstrap then
|
||||
require('packer').sync()
|
||||
end
|
||||
end)
|
||||
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
vim.g.mapleader = " "
|
||||
|
||||
-- opens file explorer
|
||||
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
|
||||
|
||||
-- centers cursor when jumping up and down page
|
||||
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||
vim.keymap.set("n", "J", "mzJ`z")
|
||||
vim.keymap.set("n", "n", "nzzzv")
|
||||
vim.keymap.set("n", "N", "Nzzzv")
|
||||
|
||||
-- easier escape back to normal mode
|
||||
vim.keymap.set("i", "<C-c>", "<Esc>")
|
||||
|
||||
vim.keymap.set("n", "Q", "<nop>")
|
||||
|
||||
-- universal find and replace
|
||||
vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
|
||||
|
||||
-- moving highlighted text
|
||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||
|
||||
-- allow for pasting over without losing buffer
|
||||
vim.keymap.set("x", "<leader>p", "\"_dP")
|
||||
|
||||
-- allow copying to system clipboard
|
||||
vim.keymap.set("n", "<leader>y", "\"+y")
|
||||
vim.keymap.set("v", "<leader>y", "\"+y")
|
||||
vim.keymap.set("n", "<leader>y", "\"+y")
|
||||
|
||||
-- allow deleting to void register
|
||||
vim.keymap.set("n", "<leader>d", "\"_d")
|
||||
vim.keymap.set("v", "<leader>d", "\"_d")
|
||||
|
||||
vim.keymap.set("n", "<leader>tc",
|
||||
function ()
|
||||
local col = "78"
|
||||
print(vim.o.cc)
|
||||
if vim.o.cc == col then
|
||||
vim.o.cc = ""
|
||||
else
|
||||
vim.o.cc = col
|
||||
end
|
||||
end,
|
||||
{desc = "Toggle color column"})
|
||||
|
||||
-- case insensitive search
|
||||
vim.keymap.set("n", "<leader>/", "/\\c")
|
||||
vim.keymap.set("n", "<leader>?", "?\\c")
|
||||
|
||||
vim.keymap.set("n", "<leader>hF",
|
||||
function()
|
||||
local result = vim.treesitter.get_captures_at_cursor(0)
|
||||
print(vim.inspect(result))
|
||||
end,
|
||||
{ noremap = true, silent = false, desc = "Describe face" }
|
||||
)
|
||||
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
vim.opt.nu = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.linebreak = true
|
||||
|
||||
local autocmd = vim.api.nvim_create_autocmd
|
||||
autocmd("bufenter", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
if vim.bo.ft ~= "terminal" then
|
||||
vim.opt.laststatus = 2
|
||||
else
|
||||
vim.opt.laststatus = 0
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- Only search with case if capital letter is typed
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.wrap = true
|
||||
|
||||
vim.opt.splitbelow = true
|
||||
|
||||
vim.opt.scrolloff = 8
|
||||
vim.opt.signcolumn = "auto"
|
||||
|
||||
vim.o.shell = "zsh"
|
||||
|
||||
-- Do not map q to :q in man mode
|
||||
vim.g.no_man_maps = true;
|
||||
|
||||
-- Local settings for when in :terminal mode
|
||||
-- I don't believe this functionality has been ported to lua.
|
||||
vim.cmd([[
|
||||
function! TerminalSettings()
|
||||
setlocal nonumber norelativenumber
|
||||
setlocal scrolloff=0
|
||||
endfunction
|
||||
autocmd TermOpen * call TerminalSettings()
|
||||
]])
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue