chore(nvim): remove nvim config
Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
parent
1b48be4ef2
commit
d3cdc74f89
12 changed files with 0 additions and 1022 deletions
|
@ -1,21 +1,4 @@
|
|||
.config/ambit/config.ambit;
|
||||
.config/nvim/[
|
||||
init.lua,
|
||||
lua/[
|
||||
completion.lua,
|
||||
lsp.lua,
|
||||
mappings.lua,
|
||||
plugins.lua,
|
||||
treesitter.lua,
|
||||
git.lua,
|
||||
neovide.lua
|
||||
],
|
||||
ftplugin/[
|
||||
tex.lua,
|
||||
racket.lua
|
||||
],
|
||||
UltiSnips/tex.snippets
|
||||
];
|
||||
.config/eww/[
|
||||
eww.yuck,
|
||||
eww.scss,
|
||||
|
|
|
@ -1,285 +0,0 @@
|
|||
global !p
|
||||
def math():
|
||||
return vim.eval('vimtex#syntax#in_mathzone()') == '1'
|
||||
|
||||
def comment():
|
||||
return vim.eval('vimtex#syntax#in_comment()') == '1'
|
||||
|
||||
def env(name):
|
||||
[x,y] = vim.eval("vimtex#env#is_inside('" + name + "')")
|
||||
return x != '0' and y != '0'
|
||||
|
||||
endglobal
|
||||
|
||||
# General Formatting
|
||||
snippet preamble "preamble" w
|
||||
\\usepackage[a4paper, margin=0.5in]{geometry}
|
||||
\\usepackage{amsmath}
|
||||
\\usepackage{amsthm}
|
||||
\\usepackage{amssymb}
|
||||
\\usepackage{enumitem}
|
||||
\\usepackage{libertine}
|
||||
\\usepackage{euler}
|
||||
|
||||
\\usepackage{import}
|
||||
\\usepackage{pdfpages}
|
||||
\\usepackage{transparent}
|
||||
\\usepackage{xcolor}
|
||||
|
||||
\\newcommand{\\incfig}[2][1]{%
|
||||
\t\\def\\svgwidth{#1\\columnwidth}
|
||||
\t\\import{./figures/}{#2.pdf_tex}
|
||||
}
|
||||
|
||||
\\pdfsuppresswarningpagegroup=1
|
||||
|
||||
\\theoremstyle{definition}
|
||||
\\newtheorem{all}{Theorem}[section]
|
||||
\\theoremstyle{definition}
|
||||
\\newtheorem{corollary}[all]{Corollary}
|
||||
\\theoremstyle{definition}
|
||||
\\newtheorem{lemma}[all]{Lemma}
|
||||
\\theoremstyle{definition}
|
||||
\\newtheorem{definition}[all]{Definition}
|
||||
\\theoremstyle{definition}
|
||||
\\newtheorem{exercise}[all]{Exercise}
|
||||
\\theoremstyle{definition}
|
||||
\\newtheorem{proposition}[all]{Proposition}
|
||||
\\theoremstyle{definition}
|
||||
\\newtheorem{example}[all]{Example}
|
||||
|
||||
\\newenvironment{lecture}[1]{
|
||||
\t\\section{\\MakeUppercase{#1}}
|
||||
\t\\vspace{-0.5em}
|
||||
\t\\hrule
|
||||
\t\\vspace{1em}
|
||||
\t\\begin{list}{}{
|
||||
\t\t\\setlength{\\leftmargin}{1.5em}
|
||||
\t}
|
||||
\t\\item[]
|
||||
}{
|
||||
\t\\end{list}
|
||||
}
|
||||
|
||||
\\newcommand{\\N}{\\mathbb{N}}
|
||||
\\newcommand{\\R}{\\mathbb{R}}
|
||||
\\newcommand{\\I}{\\mathbb{I}}
|
||||
\\newcommand{\\Z}{\\mathbb{Z}}
|
||||
|
||||
endsnippet
|
||||
|
||||
snippet beg "begin{} / end{}" bA
|
||||
\\begin{$1}
|
||||
$0
|
||||
\\end{$1}
|
||||
endsnippet
|
||||
|
||||
snippet tit "Italics" w
|
||||
\textit{$1}$0
|
||||
endsnippet
|
||||
|
||||
snippet tob "Bold" w
|
||||
\textbf{$1}$0
|
||||
endsnippet
|
||||
|
||||
# Text Formatting
|
||||
snippet ... "ldots" A
|
||||
\ldots
|
||||
endsnippet
|
||||
|
||||
# Math Environments
|
||||
snippet im "Inline math" w
|
||||
\(${1}\)`!p
|
||||
if t[2] and t[2][0] not in [',', '.', '?', '-', ' ']:
|
||||
snip.rv = ' '
|
||||
else:
|
||||
snip.rv = ''
|
||||
`$2
|
||||
endsnippet
|
||||
|
||||
snippet dm "Display math" w
|
||||
\[
|
||||
${1:${VISUAL}}
|
||||
\] $0
|
||||
endsnippet
|
||||
|
||||
# Math Snippets
|
||||
context "math()"
|
||||
snippet iff "iff" iA
|
||||
\iff $0
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet => "implies" iA
|
||||
\Rightarrow
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet =< "implied by" iA
|
||||
\Leftarrow
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet -> "maps to" iA
|
||||
\rightarrow
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet -< "maps from" iA
|
||||
\leftarrow
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet / "Fraction" i
|
||||
\\frac{$1}{$2}$0
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet '([A-Za-z])(\d)' "auto subscript" wrA
|
||||
`!p snip.rv = match.group(1)`_`!p snip.rv = match.group(2)`
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet '([A-Za-z])_(\d\d)' "auto subscript2" wrA
|
||||
`!p snip.rv = match.group(1)`_{`!p snip.rv = match.group(2)`}
|
||||
endsnippet
|
||||
|
||||
snippet __ "subscript" iA
|
||||
_{$1}$0
|
||||
endsnippet
|
||||
|
||||
snippet ^^ "superscript" iA
|
||||
^{$1}$0
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet ceil "ceil" iA
|
||||
\left\lceil $1 \right\rceil $0
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet floor "floor" iA
|
||||
\left\lfloor $1 \right\rfloor$0
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet ** "cdot" iA
|
||||
\cdot
|
||||
endsnippet
|
||||
|
||||
priority 100
|
||||
context "math()"
|
||||
snippet '(?<!\\)(sin|cos|arccot|cot|csc|ln|log|exp|star|perp)' "ln" rwA
|
||||
\\`!p snip.rv = match.group(1)`
|
||||
endsnippet
|
||||
|
||||
priority 300
|
||||
context "math()"
|
||||
snippet dint "integral" wA
|
||||
\int_{${1}}^{${2}} ${3} $0
|
||||
endsnippet
|
||||
|
||||
priority 200
|
||||
context "math()"
|
||||
snippet '(?<!\\)(arcsin|arccos|arctan|arccot|arccsc|arcsec|pi|zeta|int|iint|iiint)' "ln" rwA
|
||||
\\`!p snip.rv = match.group(1)`
|
||||
endsnippet
|
||||
|
||||
priority 100
|
||||
context "math()"
|
||||
snippet -> "to" iA
|
||||
\to
|
||||
endsnippet
|
||||
|
||||
priority 200
|
||||
context "math()"
|
||||
snippet <-> "leftrightarrow" iA
|
||||
\leftrightarrow
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet !> "mapsto" iA
|
||||
\mapsto
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet invs "inverse" iA
|
||||
^{-1}
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet compl "complement" iA
|
||||
^{c}
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet txt "text" iA
|
||||
\\text{ $1 } $0
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet set "set" wA
|
||||
\\{$1\\} $0
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet ccc "complement" Ai
|
||||
^{c}
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet ooo "infinity" iA
|
||||
\\infty
|
||||
endsnippet
|
||||
|
||||
snippet notin "not in " iA
|
||||
\not\in
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet inn "in " iA
|
||||
\in
|
||||
endsnippet
|
||||
|
||||
snippet NN "n" iA
|
||||
\N
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet cap "cap" iA
|
||||
\cap
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet cup "cup" iA
|
||||
\cup
|
||||
endsnippet
|
||||
|
||||
context "math()"
|
||||
snippet limm "limit" iA
|
||||
\\lim\\limits_{$1}{$2}$0
|
||||
endsnippet
|
||||
|
||||
priority 10
|
||||
context "math()"
|
||||
snippet "bar" "bar" riA
|
||||
\overline{$1}$0
|
||||
endsnippet
|
||||
|
||||
priority 100
|
||||
context "math()"
|
||||
snippet "([a-zA-Z])bar" "bar" riA
|
||||
\overline{`!p snip.rv=match.group(1)`}
|
||||
endsnippet
|
||||
|
||||
priority 10
|
||||
context "math()"
|
||||
snippet "hat" "hat" riA
|
||||
\hat{$1}$0
|
||||
endsnippet
|
||||
|
||||
priority 100
|
||||
context "math()"
|
||||
snippet "([a-zA-Z])hat" "hat" riA
|
||||
\hat{`!p snip.rv=match.group(1)`}
|
||||
endsnippet
|
|
@ -1,10 +0,0 @@
|
|||
local autopairs = require("nvim-autopairs")
|
||||
|
||||
autopairs.remove_rule("'")
|
||||
autopairs.remove_rule("(")
|
||||
autopairs.remove_rule("[")
|
||||
autopairs.remove_rule("{")
|
||||
autopairs.remove_rule("<")
|
||||
|
||||
vim.o["lisp"] = true
|
||||
vim.o["autoindent"] = true
|
|
@ -1,14 +0,0 @@
|
|||
-- map the key (sequence) to a command
|
||||
local function map(mode, lhs, rhs, opts)
|
||||
local options = { noremap = true }
|
||||
if opts then
|
||||
options = vim.tbl_extend("force", options, opts)
|
||||
end
|
||||
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
|
||||
end
|
||||
|
||||
map("i", "<C-c>", "<ESC>:w<CR>:!just<CR>")
|
||||
map("n", "<C-c>", "<ESC>:w<CR>:!just<CR>")
|
||||
|
||||
vim.cmd("inoremap <C-f> <Esc>: silent exec '.!inkscape-figures create \"'.getline('.').'\" \"'.b:vimtex.root.'/figures/\"'<CR><CR>:w<CR>")
|
||||
vim.cmd("nnoremap <C-f> : silent exec '!inkscape-figures edit \"'.b:vimtex.root.'/figures/\" > /dev/null 2>&1 &'<CR><CR>:redraw!<CR>")
|
|
@ -1,47 +0,0 @@
|
|||
-- https://github.com/priime0/dotfiles
|
||||
|
||||
-- given a key and value, set nvim's global settings of key to value
|
||||
local function opt(key, value)
|
||||
vim.o[key] = value
|
||||
end
|
||||
|
||||
-- line numbers
|
||||
opt("number", true)
|
||||
opt("relativenumber", true)
|
||||
|
||||
-- tabs
|
||||
opt("expandtab", true)
|
||||
opt("tabstop", 4)
|
||||
opt("shiftwidth", 4)
|
||||
opt("smarttab", true)
|
||||
|
||||
-- indentation
|
||||
opt("smartindent", true)
|
||||
opt("autoindent", true)
|
||||
|
||||
-- misc
|
||||
opt("termguicolors", true)
|
||||
opt("scrolloff", 1)
|
||||
opt("cursorline", true)
|
||||
opt("showcmd", true)
|
||||
opt("inccommand", "split")
|
||||
opt("updatetime", 100)
|
||||
opt("mouse", "a")
|
||||
opt("mousescroll", "ver:1,hor:1")
|
||||
|
||||
vim.cmd[[autocmd FocusGained * checktime]]
|
||||
|
||||
vim.g.mapleader = " "
|
||||
vim.g.copilot_no_tab_map = true
|
||||
vim.g.maplocalleader = ","
|
||||
|
||||
vim.wo.wrap = false
|
||||
vim.opt.signcolumn = "yes"
|
||||
|
||||
require("plugins")
|
||||
require("mappings")
|
||||
require("treesitter")
|
||||
require("completion")
|
||||
require("lsp")
|
||||
require("git")
|
||||
require("neovide")
|
|
@ -1 +0,0 @@
|
|||
local neogit = require("neogit")
|
|
@ -1,187 +0,0 @@
|
|||
local lspconfig = require("lspconfig")
|
||||
local cmp = require("cmp")
|
||||
local cmp_ultisnips_mappings = require("cmp_nvim_ultisnips.mappings")
|
||||
|
||||
require('lspsaga').setup {}
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
-- completion = cmp.config.window.bordered(),
|
||||
-- documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
["<Tab>"] = cmp.mapping(
|
||||
function(fallback)
|
||||
cmp_ultisnips_mappings.expand_or_jump_forwards(fallback)
|
||||
end
|
||||
),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp', priority = 1000 },
|
||||
{ name = 'ultisnips', priority = 750 }, -- For ultisnips users.
|
||||
{ name = 'path', priority = 500 },
|
||||
}, {
|
||||
})
|
||||
})
|
||||
|
||||
-- Set configuration for specific filetype.
|
||||
cmp.setup.filetype('gitcommit', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
|
||||
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline('/', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
})
|
||||
})
|
||||
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
|
||||
local on_attach = function(client, bufnr)
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
local function key(mode, keys, cmd)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, mode, keys, cmd, opts)
|
||||
end
|
||||
|
||||
local function opt(...)
|
||||
vim.api.nvim_buf_set_option(bufnr, ...)
|
||||
end
|
||||
|
||||
-- Enable completion
|
||||
opt('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
-- Mappings
|
||||
key('n', '<leader>cD', '<cmd>lua vim.lsp.buf.declaration()<CR>')
|
||||
key('n', '<leader>cd', '<cmd>lua vim.lsp.buf.definition()<CR>')
|
||||
key('n', '<leader>cp', '<cmd>Lspsaga peek_definition<CR>')
|
||||
key('n', '<leader>ch', '<cmd>Lspsaga hover_doc<CR>')
|
||||
key('n', '<leader>ci', '<cmd>lua vim.lsp.buf.implementation()<CR>')
|
||||
key('n', '<leader>sh', '<cmd>Lspsaga signature_help<CR>')
|
||||
key('n', '<leader>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>')
|
||||
key('n', '<leader>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>')
|
||||
key('n', '<leader>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>')
|
||||
key('n', '<leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>')
|
||||
key('n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>')
|
||||
key('n', '<leader>ca', '<cmd>Lspsaga code_action<CR>')
|
||||
key('n', '<leader>cr', '<cmd>lua vim.lsp.buf.references()<CR>')
|
||||
-- key('n', '<space>f', '<cmd>lua vim.lsp.buf.format()<CR>')
|
||||
key('n', '<leader>cs', '<cmd>lua vim.diagnostic.open_float()<CR>')
|
||||
end
|
||||
|
||||
lspconfig.ccls.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
init_options = {
|
||||
cache = {
|
||||
directory = vim.fn.expand("$HOME/.cache/ccls")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lspconfig.rust_analyzer.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
checkOnSave = {
|
||||
command = "clippy"
|
||||
},
|
||||
diagnostics = {
|
||||
disabled = {
|
||||
"mismatched-arg-count"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lspconfig.tsserver.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" }
|
||||
}
|
||||
|
||||
lspconfig.java_language_server.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
cmd = { "/usr/share/java/java-language-server/lang_server_linux.sh" },
|
||||
root_dir = lspconfig.util.root_pattern('*.iml', '.idea', 'build.xml', 'pom.xml', 'settings.gradle',
|
||||
'settings.gradle.kts')
|
||||
}
|
||||
|
||||
--lspconfig.jdtls.setup {
|
||||
-- on_attach = on_attach,
|
||||
-- capabilities = capabilities,
|
||||
-- root_dir = lspconfig.util.root_pattern(
|
||||
-- 'build.xml',
|
||||
-- 'pom.xml',
|
||||
-- 'settings.gradle',
|
||||
-- 'settings.gradle.kts',
|
||||
-- '*.iml',
|
||||
-- '.idea'
|
||||
-- )
|
||||
--}
|
||||
|
||||
lspconfig.racket_langserver.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
root_dir = lspconfig.util.root_pattern('main.rkt')
|
||||
}
|
||||
|
||||
lspconfig.ocamllsp.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
lspconfig.jedi_language_server.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
lspconfig.lua_ls.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
lspconfig.clojure_lsp.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
lspconfig.texlab.setup {
|
||||
on_attach=on_attach,
|
||||
capabilities=capabilities
|
||||
}
|
||||
|
||||
lspconfig.hls.setup {
|
||||
on_attach=on_attach,
|
||||
capabilities=capabilities,
|
||||
filetypes = { "haskell", "lhaskell", "cabal" }
|
||||
}
|
|
@ -1,73 +0,0 @@
|
|||
-- map the key (sequence) to a command
|
||||
local function map(mode, lhs, rhs, opts)
|
||||
local options = { noremap = true }
|
||||
if opts then
|
||||
options = vim.tbl_extend("force", options, opts)
|
||||
end
|
||||
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
|
||||
end
|
||||
|
||||
-- format
|
||||
map('n', '<leader>f', ':w<CR>:Format<CR>')
|
||||
|
||||
-- open terminal
|
||||
map("n", "<leader>ott", ":ToggleTerm<CR>")
|
||||
map("n", "<leader>otf", ":ToggleTerm direction=float<CR>")
|
||||
map("n", "<leader>otv", ":ToggleTerm direction=vertical<CR>")
|
||||
|
||||
-- exit terminal mode
|
||||
map("t", "<esc>", "<C-\\><C-n>")
|
||||
|
||||
-- open tree
|
||||
map("n", "<leader>op", ":NvimTreeToggle<CR>")
|
||||
|
||||
-- telescope
|
||||
map("n", "<leader>to", ":Telescope<CR>")
|
||||
map("n", "<leader>tf", ":Telescope find_files<CR>")
|
||||
map("n", "<leader>tg", ":Telescope live_grep<CR>")
|
||||
|
||||
-- copilot
|
||||
map('i', '<C-a>', 'copilot#Accept("<CR>")', {expr=true, silent=true})
|
||||
|
||||
-- neogit / git related
|
||||
map('n', '<leader>gg', ':Neogit<CR>')
|
||||
map('n', '<leader>gb', ':Gitsigns blame_line<CR>')
|
||||
map('n', '<leader>gs', ':Gitsigns stage_hunk<CR>')
|
||||
|
||||
-- symbols outline
|
||||
map("n", "<leader>os", ":SymbolsOutline<CR>")
|
||||
|
||||
-- leap
|
||||
map("n", "<C-s>", ":lua require('leap').leap {}<CR>")
|
||||
map("n", "<C-z>", ":lua require('leap').leap { backward = true }<CR>")
|
||||
|
||||
-- pollen
|
||||
map("i", "<A-d>", "◊")
|
||||
map("i", "<A-l>", "λ")
|
||||
|
||||
-- colorscheme toggle
|
||||
-- map("n", "<A-j>", ":let ayucolor=\"dark\"<CR>:colorscheme ayu<CR>")
|
||||
-- map("n", "<A-k>", ":let ayucolor=\"light\"<CR>:colorscheme ayu<CR>")
|
||||
map("n", "<A-j>", ":colorscheme catppuccin-mocha<CR>")
|
||||
map("n", "<A-k>", ":colorscheme catppuccin-latte<CR>")
|
||||
|
||||
-- horizontal scrolling
|
||||
map("n", "<C-l>", "zl")
|
||||
map("n", "<C-h>", "zh")
|
||||
|
||||
-- bufferline
|
||||
map("n", "<C-k>", ":BufferLineCycleNext<CR>")
|
||||
map("n", "<C-j>", ":BufferLineCyclePrev<CR>")
|
||||
map("n", "<C-S-k>", ":BufferLineMoveNext<CR>")
|
||||
map("n", "<C-S-j>", ":BufferLineMovePrev<CR>")
|
||||
map("n", "<leader>bd", ":bd<CR>")
|
||||
|
||||
-- trouble
|
||||
map("n", "<leader>od", ":TroubleToggle<CR>")
|
||||
|
||||
-- workspaces
|
||||
map("n", "<leader>pp", ":Telescope workspaces theme=dropdown<CR>")
|
||||
map("n", "<leader>pa", ":WorkspacesAdd ")
|
||||
|
||||
-- relative line numbers
|
||||
map("n", "<C-f>", ":set relativenumber!<CR>")
|
|
@ -1,13 +0,0 @@
|
|||
local fontsize = 10
|
||||
|
||||
vim.opt.guifont = { "Roboto Mono Medium", ":h" .. fontsize}
|
||||
|
||||
vim.g.neovide_hide_mouse_when_typing = true
|
||||
|
||||
vim.g.neovide_refresh_rate = 60
|
||||
vim.g.neovide_refresh_rate_idle = 5
|
||||
|
||||
vim.g.neovide_remember_window_size = false
|
||||
|
||||
vim.g.neovide_cursor_animation_length=0.08
|
||||
vim.g.neovide_cursor_trail_size = 0.6
|
|
@ -1,333 +0,0 @@
|
|||
local packer = require("packer")
|
||||
local use = packer.use
|
||||
|
||||
packer.startup(function()
|
||||
-- plugin/package manager
|
||||
use("wbthomason/packer.nvim")
|
||||
|
||||
-- lib
|
||||
use("nvim-lua/plenary.nvim")
|
||||
|
||||
-- setup
|
||||
use("Olical/aniseed")
|
||||
|
||||
-- language
|
||||
use("nvim-treesitter/nvim-treesitter")
|
||||
use("neovim/nvim-lspconfig")
|
||||
use("j-hui/fidget.nvim")
|
||||
use("onsails/lspkind-nvim")
|
||||
use("wlangstroth/vim-racket")
|
||||
use("Olical/conjure")
|
||||
use("yioneko/nvim-yati")
|
||||
|
||||
-- ui
|
||||
use("ayu-theme/ayu-vim")
|
||||
use{"catppuccin/nvim", as="catppuccin"}
|
||||
use("nvim-lua/popup.nvim")
|
||||
use("nvim-telescope/telescope.nvim")
|
||||
use("lewis6991/gitsigns.nvim")
|
||||
use("kyazdani42/nvim-web-devicons")
|
||||
use("kyazdani42/nvim-tree.lua")
|
||||
use("nvim-lualine/lualine.nvim")
|
||||
use{"akinsho/toggleterm.nvim",branch="main"}
|
||||
use("simrat39/symbols-outline.nvim")
|
||||
use("lcheylus/overlength.nvim")
|
||||
use("akinsho/bufferline.nvim")
|
||||
use("folke/trouble.nvim")
|
||||
use("m4xshen/smartcolumn.nvim")
|
||||
-- use("goolord/alpha-nvim")
|
||||
|
||||
-- completion
|
||||
use("hrsh7th/cmp-nvim-lsp")
|
||||
use("hrsh7th/cmp-buffer")
|
||||
use("hrsh7th/cmp-path")
|
||||
use("hrsh7th/cmp-cmdline")
|
||||
use("hrsh7th/nvim-cmp")
|
||||
use{"glepnir/lspsaga.nvim",branch="main"}
|
||||
use("github/copilot.vim")
|
||||
use("SirVer/ultisnips")
|
||||
use("quangnguyen30192/cmp-nvim-ultisnips")
|
||||
|
||||
-- sessions
|
||||
use("rmagatti/auto-session")
|
||||
use("rmagatti/session-lens")
|
||||
|
||||
-- misc
|
||||
use("davidgranstrom/nvim-markdown-preview")
|
||||
use("folke/todo-comments.nvim")
|
||||
use("lervag/vimtex")
|
||||
use("TimUntersberger/neogit")
|
||||
use("ggandor/leap.nvim")
|
||||
use("eraserhd/parinfer-rust")
|
||||
use("windwp/nvim-autopairs")
|
||||
use("mhartington/formatter.nvim")
|
||||
use{"kylechui/nvim-surround",branch="main"}
|
||||
use("numToStr/Comment.nvim")
|
||||
use("natecraddock/workspaces.nvim")
|
||||
use("Twinside/vim-hoogle")
|
||||
|
||||
if packer_bootstrap then
|
||||
require('packer').sync()
|
||||
end
|
||||
end)
|
||||
|
||||
-- vimtex
|
||||
vim.cmd("let g:vimtex_compiler_progname = 'nvr'")
|
||||
require("nvim-treesitter.configs").setup {
|
||||
ignore_install = { "latex" },
|
||||
highlight = {
|
||||
disable = {"latex"},
|
||||
}
|
||||
}
|
||||
|
||||
-- fidget
|
||||
require("fidget").setup {}
|
||||
|
||||
-- ayu
|
||||
-- vim.cmd([[let ayucolor="light"]])
|
||||
-- vim.cmd([[colorscheme ayu]])
|
||||
|
||||
-- catppuccin
|
||||
require("catppuccin").setup {
|
||||
flavour = "latte"
|
||||
}
|
||||
vim.cmd([[colorscheme catppuccin]])
|
||||
|
||||
-- telescope
|
||||
require("telescope").setup {
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
["<esc>"] = require("telescope.actions").close
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
hidden = true,
|
||||
file_ignore_patterns = { ".git/" }
|
||||
}
|
||||
},
|
||||
extensions = {
|
||||
workspaces = {
|
||||
keep_insert = false,
|
||||
}
|
||||
}
|
||||
}
|
||||
require("telescope").load_extension("workspaces")
|
||||
|
||||
-- git signs
|
||||
require('gitsigns').setup {
|
||||
signs = {
|
||||
add = {hl = 'GitSignsAdd' , text = '│', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
|
||||
change = {hl = 'GitSignsChange', text = '│', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
||||
delete = {hl = 'GitSignsDelete', text = '│', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
|
||||
topdelete = {hl = 'GitSignsDelete', text = '│', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
|
||||
changedelete = {hl = 'GitSignsChange', text = '│', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
|
||||
},
|
||||
signcolumn = true,
|
||||
numhl = false,
|
||||
linehl = false,
|
||||
word_diff = false,
|
||||
watch_gitdir = {
|
||||
interval = 1500,
|
||||
follow_files = true
|
||||
},
|
||||
}
|
||||
|
||||
-- nvim-web-devicons
|
||||
require('nvim-web-devicons').setup {}
|
||||
|
||||
-- nvim-tree
|
||||
require('nvim-tree').setup {
|
||||
view = {
|
||||
width = 35,
|
||||
signcolumn = "no",
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
},
|
||||
git = {
|
||||
enable = true,
|
||||
ignore = true,
|
||||
timeout = 1500,
|
||||
},
|
||||
sync_root_with_cwd = true,
|
||||
}
|
||||
|
||||
-- lualine
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
theme = 'ayu_dark'
|
||||
},
|
||||
}
|
||||
|
||||
-- toggleterm
|
||||
require('toggleterm').setup {
|
||||
open_mapping = nil,
|
||||
start_in_insert = false,
|
||||
}
|
||||
|
||||
-- markdown preview
|
||||
vim.cmd[[
|
||||
let g:mkdp_browser = 'surf'
|
||||
]]
|
||||
|
||||
-- todo-comments
|
||||
require('todo-comments').setup {}
|
||||
|
||||
-- copilot
|
||||
vim.g.copilot_filetypes = {
|
||||
['*'] = false,
|
||||
['java'] = true,
|
||||
['ocaml'] = true,
|
||||
-- ['tex'] = true,
|
||||
}
|
||||
|
||||
-- symbols-outline
|
||||
require('symbols-outline').setup {}
|
||||
|
||||
-- leap
|
||||
require('leap').setup {}
|
||||
|
||||
-- overlength
|
||||
require('overlength').setup {}
|
||||
|
||||
-- formatter
|
||||
require('formatter').setup {
|
||||
filetype = {
|
||||
rust = {
|
||||
-- Rustfmt
|
||||
function()
|
||||
return {
|
||||
exe = "rustfmt",
|
||||
args = {"--emit=stdout", "--edition=2021"},
|
||||
stdin = true
|
||||
}
|
||||
end
|
||||
},
|
||||
c = {
|
||||
require('formatter.filetypes.c').clangformat
|
||||
},
|
||||
cpp = {
|
||||
require('formatter.filetypes.cpp').clangformat
|
||||
},
|
||||
ocaml = {
|
||||
require('formatter.filetypes.ocaml').ocamlformat
|
||||
},
|
||||
python = {
|
||||
require('formatter.filetypes.python').black
|
||||
},
|
||||
javascript = {
|
||||
require('formatter.filetypes.javascript').prettier
|
||||
},
|
||||
astro = {
|
||||
require('formatter.filetypes.javascript').prettier
|
||||
},
|
||||
tex = {
|
||||
require('formatter.filetypes.latex').latexindent
|
||||
},
|
||||
java = {
|
||||
function ()
|
||||
return {
|
||||
exe = "clang-format",
|
||||
args = {
|
||||
"--style=Google",
|
||||
"--assume-filename=.java"
|
||||
},
|
||||
stdin = true
|
||||
}
|
||||
end
|
||||
},
|
||||
-- apply to all filetypes
|
||||
["*"] = {
|
||||
require('formatter.filetypes.any').remove_trailing_whitespace
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
-- bufferline
|
||||
require('bufferline').setup {}
|
||||
|
||||
-- nvim surround
|
||||
require('nvim-surround').setup {}
|
||||
|
||||
-- Comment
|
||||
require('Comment').setup {}
|
||||
|
||||
-- autopairs
|
||||
require("nvim-autopairs").setup {
|
||||
disable_filetype = { "TelescopePrompt" }
|
||||
}
|
||||
|
||||
-- trouble
|
||||
require("trouble").setup {}
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
})
|
||||
|
||||
-- workspaces
|
||||
require("workspaces").setup {}
|
||||
|
||||
-- smartcolumn
|
||||
require("smartcolumn").setup {
|
||||
colorcolumn = 0,
|
||||
disabled_filetypes = { "help", "Telescope", "TelescopePrompt" }
|
||||
}
|
||||
|
||||
-- alpha
|
||||
-- local dashboard = require'alpha.themes.dashboard'
|
||||
-- dashboard.section.header.val = {
|
||||
-- [[ &&&&& ]],
|
||||
-- [[ & & &&&&& & ]],
|
||||
-- [[ & &&&&&/& ]],
|
||||
-- [[ && &&&&& ]],
|
||||
-- [[ & &&&& ]],
|
||||
-- [[ &&&&& &&&&&& ]],
|
||||
-- [[ & & &&/|| ]],
|
||||
-- [[ & & &&& &&//~ & && ]],
|
||||
-- [[ & &&&&\__&_/ //~~& &&&&&& & ]],
|
||||
-- [[ &&&&& /|\\_/&&&&& & ]],
|
||||
-- [[ & && &&\_\&\/& & &_&&&&&& && ]],
|
||||
-- [[ & &&&&&&&/&&& \&&&&&& &&& &&]],
|
||||
-- [[ && &/ &&&&& & & ]],
|
||||
-- [[ &/&& /~~ ]],
|
||||
-- [[ /~| ]],
|
||||
-- [[ \ ]],
|
||||
-- [[ /| ]],
|
||||
-- [[ /| ]],
|
||||
-- [[ \ ]],
|
||||
-- [[ / ]],
|
||||
-- [[ ╓───────────╭╱⎨⏆╲╮───────────╖ ]],
|
||||
-- [[ ║ ║ ]],
|
||||
-- [[ ╟────────────────────────────╢ ]],
|
||||
-- [[ ╟────────────────────────────╢ ]],
|
||||
-- [[ ╚════════════════════════════╝ ]],
|
||||
-- [[ ]],
|
||||
-- [[ [ https://priime.dev ] ]],
|
||||
-- }
|
||||
-- dashboard.section.buttons.val = {
|
||||
-- dashboard.button("e", " New file", ":ene <BAR> startinsert <CR>"),
|
||||
-- dashboard.button("SPC p p", " Open projects"),
|
||||
-- dashboard.button("SPC t f", " Find files"),
|
||||
-- dashboard.button("SPC t g", " Grep text"),
|
||||
-- dashboard.button("q", " Quit NVIM", ":qa<CR>"),
|
||||
-- }
|
||||
-- dashboard.config.opts.noautocmd = true
|
||||
-- dashboard.config.opts.redraw_on_resize = false
|
||||
|
||||
-- require("alpha").setup(dashboard.config)
|
||||
|
||||
-- sessions
|
||||
require("auto-session").setup {
|
||||
log_level = "error",
|
||||
cwd_change_handling = {
|
||||
restore_upcoming_session = true,
|
||||
post_cwd_changed_hook = function()
|
||||
require("lualine").refresh()
|
||||
vim.cmd([[filetype detect]])
|
||||
end,
|
||||
},
|
||||
auto_session_suppress_dirs = { "~/", "/" }
|
||||
}
|
||||
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
||||
|
||||
require("session-lens").setup {}
|
|
@ -1,42 +0,0 @@
|
|||
local ts_config = require("nvim-treesitter.configs")
|
||||
|
||||
ts_config.setup {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"cpp",
|
||||
"css",
|
||||
"haskell",
|
||||
"html",
|
||||
"java",
|
||||
"javascript",
|
||||
"json",
|
||||
"latex",
|
||||
"lua",
|
||||
"make",
|
||||
"markdown",
|
||||
"ocaml",
|
||||
"python",
|
||||
"regex",
|
||||
"rust",
|
||||
"scss",
|
||||
"svelte",
|
||||
"toml",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vue",
|
||||
"yaml"
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
use_languagetree = true
|
||||
},
|
||||
indent = {
|
||||
enable = false,
|
||||
disable = { "python" }
|
||||
},
|
||||
yati = {
|
||||
enable = true,
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue