[MAJOR] Massive restructure. FIXED TAB BUG . Packer -> Lazy . barbar -> bufferline .
This commit is contained in:
parent
6796e50944
commit
51dddb6fc9
16 changed files with 308 additions and 500 deletions
|
@ -42,6 +42,7 @@ function mónade
|
|||
end
|
||||
|
||||
set -gx EDITOR vim
|
||||
set -gx TERM 'xterm-256color'
|
||||
|
||||
fish_add_path /var/lib/snapd/snap/bin
|
||||
fish_add_path $HOME/.local/share/nvim/mason/bin
|
||||
|
|
|
@ -1,149 +0,0 @@
|
|||
snippet templateHs "Start file with template"
|
||||
\documentclass{article}
|
||||
|
||||
%imports
|
||||
%include polycode.fmt
|
||||
%format (cond (p) (f) (g)) = "\mcond{" p "}{" f "}{" g "}"
|
||||
%format (div (x)(y)) = x "\div " y
|
||||
%format succ = "\succ "
|
||||
%format ==> = "\Longrightarrow "
|
||||
%format map = "\map "
|
||||
%format length = "\length "
|
||||
%format fst = "\p1"
|
||||
%format p1 = "\p1"
|
||||
%format snd = "\p2"
|
||||
%format p2 = "\p2"
|
||||
%format Left = "i_1"
|
||||
%format Right = "i_2"
|
||||
%format i1 = "i_1"
|
||||
%format i2 = "i_2"
|
||||
%format >< = "\times"
|
||||
%format >|< = "\bowtie "
|
||||
%format |-> = "\mapsto"
|
||||
%format . = "\comp "
|
||||
%format .=?=. = "\mathbin{\stackrel{\mathrm{?}}{=}}"
|
||||
%format (kcomp (f)(g)) = f "\kcomp " g
|
||||
%format -|- = "+"
|
||||
%format conc = "\mathsf{conc}"
|
||||
%format summation = "{\sum}"
|
||||
%format (either (a) (b)) = "\alt{" a "}{" b "}"
|
||||
%format (frac (a) (b)) = "\frac{" a "}{" b "}"
|
||||
%format (uncurry f) = "\uncurry{" f "}"
|
||||
%format (const (f)) = "\underline{" f "}"
|
||||
%format TLTree = "\mathsf{TLTree}"
|
||||
%format (lcbr (x)(y)) = "\begin{lcbr}" x "\\" y "\end{lcbr}"
|
||||
%format (split (x) (y)) = "\conj{" x "}{" y "}"
|
||||
%format (for (f) (i)) = "\for{" f "}\ {" i "}"
|
||||
%format B_tree = "\mathsf{B}\mbox{-}\mathsf{tree} "
|
||||
\def\ana#1{\mathopen{[\!(}#1\mathclose{)\!]}}
|
||||
%format <$> = "\mathbin{\mathopen{\langle}\$\mathclose{\rangle}}"
|
||||
%format Either a b = a "+" b
|
||||
%format fmap = "\mathsf{fmap}"
|
||||
%format NA = "\textsc{na}"
|
||||
%format NB = "\textsc{nb}"
|
||||
%format inT = "\mathsf{in}"
|
||||
%format outT = "\mathsf{out}"
|
||||
%format outLTree = "\mathsf{out}"
|
||||
%format inLTree = "\mathsf{in}"
|
||||
%format inFTree = "\mathsf{in}"
|
||||
%format outFTree = "\mathsf{out}"
|
||||
%format Null = "1"
|
||||
%format (Prod (a) (b)) = a >< b
|
||||
%format fF = "\fun F "
|
||||
%format k1 = "k_1 "
|
||||
%format k2 = "k_2 "
|
||||
%format h1 = "h_1 "
|
||||
%format h2 = "h_2 "
|
||||
%format f1 = "f_1 "
|
||||
%format f2 = "f_2 "
|
||||
%format l1 = "l_1 "
|
||||
%format map1 = "map_1 "
|
||||
%format map2 = "map_2 "
|
||||
%format map3 = "map_3"
|
||||
%format l2 = "l_2 "
|
||||
%format Dist = "\fun{Dist}"
|
||||
%format IO = "\fun{IO}"
|
||||
%format LTree = "{\LTree}"
|
||||
%format FTree = "{\FTree}"
|
||||
%format inNat = "\mathsf{in}"
|
||||
%format (cata (f)) = "\cata{" f "}"
|
||||
%format (cataNat (g)) = "\cataNat{" g "}"
|
||||
%format (cataList (g)) = "\cataList{" g "}"
|
||||
%format (anaList (g)) = "\anaList{" g "}"
|
||||
%format Nat0 = "\N_0"
|
||||
%format Rational = "\Q "
|
||||
%format toRational = " to_\Q "
|
||||
%format fromRational = " from_\Q "
|
||||
%format muB = "\mu "
|
||||
%format (frac (n)(m)) = "\frac{" n "}{" m "}"
|
||||
%format (fac (n)) = "{" n "!}"
|
||||
%format (underbrace (t) (p)) = "\underbrace{" t "}_{" p "}"
|
||||
%format matrix = "matrix"
|
||||
%%format (bin (n) (k)) = "\Big(\vcenter{\xymatrix@R=1pt{" n "\\" k "}}\Big)"
|
||||
%format `ominus` = "\mathbin{\ominus}"
|
||||
%format % = "\mathbin{/}"
|
||||
%format <-> = "{\,\leftrightarrow\,}"
|
||||
%format <|> = "{\,\updownarrow\,}"
|
||||
%format `minusNat`= "\mathbin{-}"
|
||||
%format ==> = "\Rightarrow"
|
||||
%format .==>. = "\Rightarrow"
|
||||
%format .<==>. = "\Leftrightarrow"
|
||||
%format .==. = "\equiv"
|
||||
%format .<=. = "\leq"
|
||||
%format .&&&. = "\wedge"
|
||||
%format cdots = "\cdots "
|
||||
%format pi = "\pi "
|
||||
%format (curry (f)) = "\overline{" f "}"
|
||||
%format (cataLTree (x)) = "\llparenthesis\, " x "\,\rrparenthesis"
|
||||
%format (cataFTree (x)) = "\llparenthesis\, " x "\,\rrparenthesis"
|
||||
%format (anaLTree (x)) = "\mathopen{[\!(}" x "\mathclose{)\!]}"
|
||||
%format delta = "\Delta "
|
||||
%format (plus (f)(g)) = "{" f "}\plus{" g "}"
|
||||
%format ++ = "\mathbin{+\!\!\!+}"
|
||||
%format Integer = "\mathbb{Z}"
|
||||
\def\plus{\mathbin{\dagger}}
|
||||
\usepackage[all]{xy}
|
||||
\usepackage{mathtools}
|
||||
\usepackage[a4paper,left=3cm,right=2cm,top=2.5cm,bottom=2.5cm]{geometry}
|
||||
\usepackage{palatino}
|
||||
\usepackage[colorlinks=true,linkcolor=blue,citecolor=blue]{hyperref}
|
||||
\usepackage{graphicx}
|
||||
\usepackage{cp2122t}
|
||||
\usepackage{subcaption}
|
||||
\usepackage{adjustbox}
|
||||
\usepackage{color}
|
||||
|
||||
|
||||
\title{\Huge{Some Class}}
|
||||
\author{\huge{Afonso Franco}}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
\newpage
|
||||
|
||||
\tableofcontents
|
||||
\pagebreak
|
||||
|
||||
$1
|
||||
|
||||
\end{document}
|
||||
endsnippet
|
||||
|
||||
snippet rule "Add CP rule"
|
||||
\equiv \\{\text{Propriedade ${1:Nome/Numero}}\\}\\\\
|
||||
endsnippet
|
||||
|
||||
snippet split "Add CP split"
|
||||
\langle $1 \rangle
|
||||
endsnippet
|
||||
|
||||
snippet diagram "Create diagram template"
|
||||
\xymatrix{
|
||||
$1
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet arrow "Create arrow in diagram"
|
||||
\ar[${1:direction}]^{${2:functions}}
|
||||
endsnippet
|
|
@ -1,23 +1,3 @@
|
|||
|
||||
|
||||
local install_path = vim.fn.stdpath("data").."/site/pack/packer/start/packer.nvim"
|
||||
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
|
||||
print("Downloading Packer ...")
|
||||
vim.fn.system({"git", "clone", "https://github.com/wbthomason/packer.nvim", install_path})
|
||||
vim.api.nvim_command("packadd packer.nvim")
|
||||
require("plugins.packer")
|
||||
require("packer").sync()
|
||||
end
|
||||
|
||||
require("core.variables")
|
||||
require('core.package_manager')
|
||||
require('impatient')
|
||||
require('plugins.theme')
|
||||
|
||||
Config = {
|
||||
theme="onedark",
|
||||
statusline = {
|
||||
minimal = false
|
||||
}
|
||||
}
|
||||
|
||||
-- Mapping
|
||||
require("mappings")
|
||||
|
|
33
.config/nvim/lazy-lock.json
Normal file
33
.config/nvim/lazy-lock.json
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "5d57303efde86fcb0959c52b1a6d40f923940f34" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "028a87933d99f8bb88f2f70a4def3ff9574f3594" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "23c51b2a3c00f6abc4e922dbd7c3b9aca6992063" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "59224771f91b86d1de12570b4070fe4ad7cd1eeb" },
|
||||
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "d2768cb1b83de649d57d967085fe73c5e01f8fd7" },
|
||||
"cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "4436d6f41e2f6b8ada57588acd1a9f8b3d21453c" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "44585a0c0085765195e6961c15529ba6c5a2a13b" },
|
||||
"impatient.nvim": { "branch": "main", "commit": "c90e273f7b8c50a02f956c24ce4804a47f18162e" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "666ed7bf73eb5895253c1155bd29270b066cbdac" },
|
||||
"leap.nvim": { "branch": "main", "commit": "a968ab4250840dc879e805f918b4f3b892310a12" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "43c7f402cb9822b61b5dc05bf0b385928df256a6" },
|
||||
"mason.nvim": { "branch": "main", "commit": "5ab101aa11849c2424d5b87726105daae8cb49e8" },
|
||||
"null-ls.nvim": { "branch": "main", "commit": "915558963709ea17c5aa246ca1c9786bfee6ddb4" },
|
||||
"nvim": { "branch": "main", "commit": "ecfa842c38b937596c81fa8df2123de69b980081" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "f00eb3b766c370cb34fdabc29c760338ba9e4c6c" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "11a95792a5be0f5a40bab5fc5b670e5b1399a939" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "ed88435764d8b00442e66d39ec3d9c360e560783" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "51d220e0bd8922caabcb3e5de936fc599a1bd210" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "cacee4828152dd3a83736169ae61bbcd29a3d213" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "6c38926351372ea87034dec26182b62c835ff3bc" },
|
||||
"onedark.vim": { "branch": "main", "commit": "b6b5ffe31a195a3077338d7a506b905e4a51590f" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "1c7e3e6b0f4dd5a174fcea9fda8a4d7de593b826" },
|
||||
"startup.nvim": { "branch": "master", "commit": "b060480d2e647534faf70fa1263fe7623b77b0ce" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b79cd6c88b3d96b0f49cb7d240807cd59b610cd8" },
|
||||
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
||||
"vimtex": { "branch": "master", "commit": "bd0173e7d3c0097c5b855265ce83f5863f073c85" }
|
||||
}
|
17
.config/nvim/lua/core/package_manager.lua
Normal file
17
.config/nvim/lua/core/package_manager.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
--Call lazy config here
|
||||
require('plugins.lazy')
|
29
.config/nvim/lua/core/variables.lua
Normal file
29
.config/nvim/lua/core/variables.lua
Normal file
|
@ -0,0 +1,29 @@
|
|||
--Leader
|
||||
vim.g.mapleader = " "
|
||||
--termguicolors
|
||||
vim.opt.termguicolors = true
|
||||
--Relative line numbers
|
||||
vim.wo.number=true
|
||||
vim.wo.relativenumber= true
|
||||
--Remove search highlight
|
||||
vim.opt.hlsearch = false
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.smartindent = true
|
||||
--Move lines
|
||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||
--Remove Wrap
|
||||
vim.opt.wrap = false
|
||||
--Not let cursor go bellow 10 chars.
|
||||
vim.opt.scrolloff = 10
|
||||
--4 space indent
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
--quickfix keybinds
|
||||
vim.keymap.set("n", "<C-k>", "<cmd>cnext<CR>zz")
|
||||
vim.keymap.set("n", "<C-j>", "<cmd>cprev<CR>zz")
|
||||
--Undo dir
|
||||
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||
vim.opt.undofile = true
|
|
@ -1,64 +0,0 @@
|
|||
--Leader
|
||||
vim.g.mapleader = " "
|
||||
--Relative line numbers
|
||||
vim.wo.number=true
|
||||
vim.wo.relativenumber= true
|
||||
--Remove search highlight
|
||||
vim.opt.hlsearch = false
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.smartindent = true
|
||||
--Move lines
|
||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||
--Remove Wrap
|
||||
vim.opt.wrap = false
|
||||
--Not let cursor go bellow 10 chars.
|
||||
vim.opt.scrolloff = 10
|
||||
--4 space indent
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
--quickfix keybinds
|
||||
vim.keymap.set("n", "<C-k>", "<cmd>cnext<CR>zz")
|
||||
vim.keymap.set("n", "<C-j>", "<cmd>cprev<CR>zz")
|
||||
--Undo dir
|
||||
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||
vim.opt.undofile = true
|
||||
--TAB KEYBINDINGS
|
||||
local map = vim.api.nvim_set_keymap
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
-- Move to previous/next
|
||||
map('n', '<A-,>', '<Cmd>BufferPrevious<CR>', opts)
|
||||
map('n', '<A-.>', '<Cmd>BufferNext<CR>', opts)
|
||||
-- Re-order to previous/next
|
||||
map('n', '<A-<>', '<Cmd>BufferMovePrevious<CR>', opts)
|
||||
map('n', '<A->>', '<Cmd>BufferMoveNext<CR>', opts)
|
||||
-- Goto buffer in position...
|
||||
map('n', '<A-1>', '<Cmd>BufferGoto 1<CR>', opts)
|
||||
map('n', '<A-2>', '<Cmd>BufferGoto 2<CR>', opts)
|
||||
map('n', '<A-3>', '<Cmd>BufferGoto 3<CR>', opts)
|
||||
map('n', '<A-4>', '<Cmd>BufferGoto 4<CR>', opts)
|
||||
map('n', '<A-5>', '<Cmd>BufferGoto 5<CR>', opts)
|
||||
map('n', '<A-6>', '<Cmd>BufferGoto 6<CR>', opts)
|
||||
map('n', '<A-7>', '<Cmd>BufferGoto 7<CR>', opts)
|
||||
map('n', '<A-8>', '<Cmd>BufferGoto 8<CR>', opts)
|
||||
map('n', '<A-9>', '<Cmd>BufferGoto 9<CR>', opts)
|
||||
map('n', '<A-0>', '<Cmd>BufferLast<CR>', opts)
|
||||
-- Pin/unpin buffer
|
||||
map('n', '<A-p>', '<Cmd>BufferPin<CR>', opts)
|
||||
-- Close buffer
|
||||
map('n', '<A-c>', '<Cmd>BufferClose<CR>', opts)
|
||||
-- Magic buffer-picking mode
|
||||
map('n', '<C-p>', '<Cmd>BufferPick<CR>', opts)
|
||||
-- Sort automatically by...
|
||||
map('n', '<Space>bb', '<Cmd>BufferOrderByBufferNumber<CR>', opts)
|
||||
map('n', '<Space>bd', '<Cmd>BufferOrderByDirectory<CR>', opts)
|
||||
map('n', '<Space>bl', '<Cmd>BufferOrderByLanguage<CR>', opts)
|
||||
map('n', '<Space>bw', '<Cmd>BufferOrderByWindowNumber<CR>', opts)
|
||||
|
||||
--NVimTree
|
||||
map('n', '<C-n>', '<Cmd>NvimTreeToggle<CR>',opts)
|
||||
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
-- Set barbar's options
|
||||
require'bufferline'.setup {
|
||||
-- Enable/disable animations
|
||||
animation = true,
|
||||
|
||||
-- Enable/disable auto-hiding the tab bar when there is a single buffer
|
||||
auto_hide = false,
|
||||
|
||||
-- Enable/disable current/total tabpages indicator (top right corner)
|
||||
tabpages = true,
|
||||
|
||||
-- Enable/disable close button
|
||||
closable = true,
|
||||
|
||||
-- Enables/disable clickable tabs
|
||||
-- - left-click: go to buffer
|
||||
-- - middle-click: delete buffer
|
||||
clickable = true,
|
||||
|
||||
-- Excludes buffers from the tabline
|
||||
exclude_ft = {'javascript'},
|
||||
exclude_name = {'package.json'},
|
||||
|
||||
-- Show every buffer
|
||||
hide = {current = false, inactive = false, visible = false},
|
||||
|
||||
|
||||
-- Enable/disable icons
|
||||
-- if set to 'numbers', will show buffer index in the tabline
|
||||
-- if set to 'both', will show buffer index and icons in the tabline
|
||||
icons = true,
|
||||
|
||||
-- If set, the icon color will follow its corresponding buffer
|
||||
-- highlight group. By default, the Buffer*Icon group is linked to the
|
||||
-- Buffer* group (see Highlighting below). Otherwise, it will take its
|
||||
-- default value as defined by devicons.
|
||||
icon_custom_colors = false,
|
||||
|
||||
-- Configure icons on the bufferline.
|
||||
icon_separator_active = '▎',
|
||||
icon_separator_inactive = '▎',
|
||||
icon_close_tab = '',
|
||||
icon_close_tab_modified = '●',
|
||||
icon_pinned = '車',
|
||||
|
||||
-- If true, new buffers will be inserted at the start/end of the list.
|
||||
-- Default is to insert after current buffer.
|
||||
insert_at_end = false,
|
||||
insert_at_start = false,
|
||||
|
||||
-- Sets the maximum padding width with which to surround each tab
|
||||
maximum_padding = 1,
|
||||
|
||||
-- Sets the minimum padding width with which to surround each tab
|
||||
minimum_padding = 1,
|
||||
|
||||
-- Sets the maximum buffer name length.
|
||||
maximum_length = 30,
|
||||
|
||||
-- If set, the letters for each buffer in buffer-pick mode will be
|
||||
-- assigned based on their name. Otherwise or in case all letters are
|
||||
-- already assigned, the behavior is to assign letters in order of
|
||||
-- usability (see order below)
|
||||
semantic_letters = true,
|
||||
|
||||
-- New buffer letters are assigned in this order. This order is
|
||||
-- optimal for the qwerty keyboard layout but might need adjustement
|
||||
-- for other layouts.
|
||||
letters = 'asdfjkl;ghnmxcvbziowerutyqpASDFJKLGHNMXCVBZIOWERUTYQP',
|
||||
|
||||
-- Sets the name of unnamed buffers. By default format is "[Buffer X]"
|
||||
-- where X is the buffer number. But only a static string is accepted here.
|
||||
no_name_title = nil,
|
||||
}
|
70
.config/nvim/lua/plugins/bufferline.lua
Normal file
70
.config/nvim/lua/plugins/bufferline.lua
Normal file
|
@ -0,0 +1,70 @@
|
|||
--KEYBINDINGS
|
||||
local map = vim.api.nvim_set_keymap
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
-- Move to previous/next
|
||||
map('n', '<A-,>', '<Cmd>BufferLineCyclePrev<CR>', opts)
|
||||
map('n', '<A-.>', '<Cmd>BufferLineCycleNext<CR>', opts)
|
||||
-- Re-order to previous/next
|
||||
map('n', '<A-<>', '<Cmd>BufferLineMovePrevious<CR>', opts)
|
||||
map('n', '<A->>', '<Cmd>BufferLineMoveNext<CR>', opts)
|
||||
-- Goto buffer in position...
|
||||
map('n', '<A-1>', '<Cmd>BufferLineGoToBuffer 1<CR>', opts)
|
||||
map('n', '<A-2>', '<Cmd>BufferLineGoToBuffer 2<CR>', opts)
|
||||
map('n', '<A-3>', '<Cmd>BufferLineGoToBuffer 3<CR>', opts)
|
||||
map('n', '<A-4>', '<Cmd>BufferLineGoToBuffer 4<CR>', opts)
|
||||
map('n', '<A-5>', '<Cmd>BufferLineGoToBuffer 5<CR>', opts)
|
||||
map('n', '<A-6>', '<Cmd>BufferLineGoToBuffer 6<CR>', opts)
|
||||
map('n', '<A-7>', '<Cmd>BufferLineGoToBuffer 7<CR>', opts)
|
||||
map('n', '<A-8>', '<Cmd>BufferLineGoToBuffer 8<CR>', opts)
|
||||
map('n', '<A-9>', '<Cmd>BufferLineGoToBuffer 9<CR>', opts)
|
||||
-- Close buffer
|
||||
map('n', '<A-c>', '<Cmd>BufferLinePickClose<CR>', opts)
|
||||
|
||||
-- Set bufferline's options
|
||||
require("bufferline").setup({
|
||||
options = {
|
||||
mode = "buffers",
|
||||
numbers = "none",
|
||||
close_command = "bdelete! %d",
|
||||
right_mouse_command = "bdelete! %d",
|
||||
left_mouse_command = "buffer %d",
|
||||
middle_mouse_command = "bdelete! %d",
|
||||
indicator = {
|
||||
icon = "▎",
|
||||
style = "icon",
|
||||
},
|
||||
buffer_close_icon = '',
|
||||
modified_icon = '●',
|
||||
close_icon = '',
|
||||
left_trunc_marker = '',
|
||||
right_trunc_marker = '',
|
||||
max_name_length = 18,
|
||||
max_prefix_length = 15,
|
||||
truncate_names = true,
|
||||
tab_size = 18,
|
||||
diagnostics = "nvim_lsp",
|
||||
diagnostics_update_in_insert = true,
|
||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||
return "(" .. count .. ")"
|
||||
end,
|
||||
color_icons = true,
|
||||
show_buffer_icons = true,
|
||||
show_buffer_close_icons = true,
|
||||
show_buffer_default_icon = true,
|
||||
show_close_icon = true,
|
||||
show_tab_indicators = true,
|
||||
show_duplicate_prefix = true,
|
||||
persist_buffer_sort = true,
|
||||
separator_style = "slant",
|
||||
enforce_regular_tabs = true,
|
||||
always_show_bufferline = true,
|
||||
hover = {
|
||||
enabled = true,
|
||||
delay = 200,
|
||||
reveal = { 'close' }
|
||||
},
|
||||
sort_by = 'insert_after_current',
|
||||
},
|
||||
highlights = require("catppuccin.groups.integrations.bufferline").get()
|
||||
})
|
|
@ -62,18 +62,11 @@ cmp.setup {
|
|||
i = cmp.mapping.abort(),
|
||||
c = cmp.mapping.close(),
|
||||
},
|
||||
-- Accept currently selected item. If none selected, `select` first item.
|
||||
-- Set `select` to `false` to only confirm explicitly selected items.
|
||||
["<CR>"] = cmp.mapping.confirm { select = true },
|
||||
-- Accept currently selected item. If none selected, do nothing.
|
||||
["<CR>"] = cmp.mapping.confirm { select = false },
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expandable() then
|
||||
luasnip.expand()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif check_backspace() then
|
||||
fallback()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
|
@ -84,8 +77,6 @@ cmp.setup {
|
|||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
|
@ -125,7 +116,7 @@ cmp.setup {
|
|||
local kind = entry:get_kind()
|
||||
local line = context.cursor_line
|
||||
local col = context.cursor.col
|
||||
local char_before_cursor = string.sub(line, col - 1, col)
|
||||
local char_before_cursor = string.sub(line, col - 1, col - 1)
|
||||
|
||||
|
||||
if char_before_cursor == "." then
|
||||
|
@ -144,7 +135,7 @@ cmp.setup {
|
|||
|
||||
},
|
||||
{ name = 'nvim_lua' },
|
||||
{ name = 'luasnip'},
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'nvim_lsp_signature_help' },
|
||||
{ name = "path" },
|
||||
},
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
vim.g.coq_settings = {
|
||||
auto_start = 'shut-up',
|
||||
clients = {
|
||||
tmux = { enabled = false },
|
||||
},
|
||||
}
|
141
.config/nvim/lua/plugins/lazy.lua
Normal file
141
.config/nvim/lua/plugins/lazy.lua
Normal file
|
@ -0,0 +1,141 @@
|
|||
local lazy = require('lazy')
|
||||
|
||||
lazy.setup({
|
||||
|
||||
'lewis6991/impatient.nvim',
|
||||
|
||||
-------------------------------------------THEMES------------------------------------------
|
||||
'joshdick/onedark.vim',
|
||||
{ 'catppuccin/nvim',
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function ()
|
||||
require('plugins.catppuccin')
|
||||
end
|
||||
},
|
||||
-------------------------------------------------------QOL---------------------------------
|
||||
--better navigation with 's-letter'
|
||||
{ 'ggandor/leap.nvim',
|
||||
config = function()
|
||||
require('leap').add_default_mappings()
|
||||
end
|
||||
},
|
||||
|
||||
--Change add and remove surroundings from words
|
||||
'tpope/vim-surround',
|
||||
|
||||
-- Rename variable pop up
|
||||
'stevearc/dressing.nvim',
|
||||
|
||||
{ 'windwp/nvim-autopairs',
|
||||
config = function() require('nvim-autopairs').setup {}
|
||||
end
|
||||
},
|
||||
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
|
||||
{
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons', opt = true },
|
||||
config = function()
|
||||
require 'plugins.lualine'
|
||||
end
|
||||
},
|
||||
|
||||
-------------------------------------------------------LSP----------------------------------------------
|
||||
{ 'hrsh7th/nvim-cmp',
|
||||
dependencies = {
|
||||
'hrsh7th/cmp-nvim-lsp', -- lsp
|
||||
'hrsh7th/cmp-nvim-lua', -- Nvim API completions
|
||||
'hrsh7th/cmp-nvim-lsp-signature-help', -- Show function signatures
|
||||
'hrsh7th/cmp-buffer', --buffer completions
|
||||
'hrsh7th/cmp-path', --path completions
|
||||
'hrsh7th/cmp-cmdline', --cmdline completions
|
||||
'L3MON4D3/LuaSnip',
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
},
|
||||
config = function()
|
||||
require 'plugins.cmp'
|
||||
end
|
||||
},
|
||||
|
||||
--LSP Status
|
||||
{ 'j-hui/fidget.nvim',
|
||||
config = function()
|
||||
require('fidget').setup {}
|
||||
end
|
||||
},
|
||||
|
||||
{ 'williamboman/mason.nvim',
|
||||
config = function()
|
||||
require 'plugins.mason'
|
||||
end
|
||||
},
|
||||
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
|
||||
{ 'neovim/nvim-lspconfig',
|
||||
config = function()
|
||||
require 'plugins.lspconfig'
|
||||
end
|
||||
},
|
||||
|
||||
{ 'jose-elias-alvarez/null-ls.nvim',
|
||||
config = function()
|
||||
require 'plugins.null-ls'
|
||||
end
|
||||
},
|
||||
|
||||
{ 'lervag/vimtex',
|
||||
config = function()
|
||||
require 'plugins.vimtex'
|
||||
end
|
||||
},
|
||||
-------------------------------------------------------------------------------------------
|
||||
-- Syntax Highlighting
|
||||
{ 'nvim-treesitter/nvim-treesitter',
|
||||
config = function()
|
||||
require 'plugins.treesitter'
|
||||
end
|
||||
},
|
||||
|
||||
--Sticky headers
|
||||
{ 'nvim-treesitter/nvim-treesitter-context',
|
||||
config = function()
|
||||
require 'plugins.treesitter-context'
|
||||
end
|
||||
},
|
||||
|
||||
--Tabs
|
||||
{ 'akinsho/bufferline.nvim',
|
||||
version = 'v3.*',
|
||||
dependencies = 'nvim-tree/nvim-web-devicons',
|
||||
config = function()
|
||||
require("plugins.bufferline")
|
||||
end
|
||||
},
|
||||
--{ 'romgrk/barbar.nvim',
|
||||
-- dependencies = 'nvim-tree/nvim-web-devicons',
|
||||
-- config = function()
|
||||
-- require 'plugins.barbar'
|
||||
-- end
|
||||
--},
|
||||
|
||||
--does so much
|
||||
{
|
||||
'nvim-telescope/telescope.nvim', tag = '0.1.0',
|
||||
-- or , branch = '0.1.x',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function() require('plugins.telescope') end
|
||||
},
|
||||
|
||||
|
||||
--Main menu
|
||||
{ 'startup-nvim/startup.nvim',
|
||||
dependencies = { 'nvim-telescope/telescope.nvim', 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
require('startup').setup { theme = 'dashboard' }
|
||||
end,
|
||||
},
|
||||
|
||||
})
|
|
@ -21,7 +21,7 @@ require('lualine').setup {
|
|||
lualine_a = {'mode'},
|
||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
||||
lualine_x = {'lsp', 'fileformat', 'filetype'},
|
||||
lualine_y = {'progress'},
|
||||
lualine_z = {'location'}
|
||||
},
|
||||
|
|
|
@ -1,162 +0,0 @@
|
|||
local packer = require("packer")
|
||||
|
||||
local plugins = packer.startup({ function(use)
|
||||
|
||||
use {
|
||||
"wbthomason/packer.nvim",
|
||||
config = [[require("plugins.packer")]]
|
||||
}
|
||||
|
||||
use { "lewis6991/impatient.nvim" }
|
||||
|
||||
|
||||
use { "lervag/vimtex",
|
||||
config = function()
|
||||
require "plugins.vimtex"
|
||||
end
|
||||
}
|
||||
|
||||
-------------------------------------------------------QOL----------------------------------------------
|
||||
|
||||
use { "ggandor/leap.nvim",
|
||||
config = function()
|
||||
require('leap').add_default_mappings()
|
||||
end
|
||||
}
|
||||
|
||||
use { "stevearc/dressing.nvim" } -- Rename variable pop up
|
||||
|
||||
use { "windwp/nvim-autopairs",
|
||||
config = function() require("nvim-autopairs").setup {}
|
||||
end
|
||||
}
|
||||
|
||||
use { "kyazdani42/nvim-web-devicons" }
|
||||
|
||||
use {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
requires = { "kyazdani42/nvim-web-devicons", opt = true },
|
||||
config = function()
|
||||
require 'plugins.lualine'
|
||||
end
|
||||
}
|
||||
|
||||
use {"j-hui/fidget.nvim",
|
||||
config = function ()
|
||||
require("fidget").setup{}
|
||||
end
|
||||
}
|
||||
|
||||
use {"voldikss/vim-floaterm"}
|
||||
|
||||
--------------------------------------------------SUGGESTION BOX-----------------------------------------
|
||||
use { "hrsh7th/nvim-cmp",
|
||||
requires = {
|
||||
"hrsh7th/cmp-nvim-lsp", -- lsp
|
||||
"hrsh7th/cmp-nvim-lua", -- Nvim API completions
|
||||
"hrsh7th/cmp-nvim-lsp-signature-help", -- Show function signatures
|
||||
"hrsh7th/cmp-buffer", --buffer completions
|
||||
"hrsh7th/cmp-path", --path completions
|
||||
"hrsh7th/cmp-cmdline" --cmdline completions
|
||||
},
|
||||
config = function()
|
||||
require "plugins.cmp"
|
||||
end
|
||||
}
|
||||
|
||||
use { "L3MON4D3/LuaSnip",
|
||||
requires = {
|
||||
"saadparwaiz1/cmp_luasnip"
|
||||
},
|
||||
}
|
||||
-------------------------------------------------------LSP----------------------------------------------
|
||||
|
||||
use { "williamboman/mason.nvim",
|
||||
config = function()
|
||||
require "plugins.mason"
|
||||
end
|
||||
}
|
||||
|
||||
use { "williamboman/mason-lspconfig.nvim" }
|
||||
|
||||
use { "neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require "plugins.lspconfig"
|
||||
end
|
||||
}
|
||||
|
||||
use { "jose-elias-alvarez/null-ls.nvim",
|
||||
config = function()
|
||||
require "plugins.null-ls"
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
use { "nvim-tree/nvim-tree.lua",
|
||||
requires = {
|
||||
"nvim-tree/nvim-web-devicons", -- optional, for file icons
|
||||
},
|
||||
config = function()
|
||||
require("nvim-tree").setup()
|
||||
end
|
||||
}
|
||||
use { "feline-nvim/feline.nvim" }
|
||||
-------------------------------------------THEMES------------------------------------------
|
||||
|
||||
use { "joshdick/onedark.vim" }
|
||||
use { "catppuccin/nvim" }
|
||||
-------------------------------------------------------------------------------------------
|
||||
use { "nvim-treesitter/nvim-treesitter",
|
||||
config = function()
|
||||
require "plugins.treesitter"
|
||||
end
|
||||
}
|
||||
|
||||
use { "nvim-treesitter/nvim-treesitter-context",
|
||||
config = function()
|
||||
require "plugins.treesitter-context"
|
||||
end
|
||||
}
|
||||
|
||||
--Tabs
|
||||
use { "romgrk/barbar.nvim",
|
||||
requires = "kyazdani42/nvim-web-devicons",
|
||||
config = function()
|
||||
require "plugins.barbar"
|
||||
end
|
||||
}
|
||||
|
||||
--fuzzy file finding
|
||||
use {
|
||||
"nvim-telescope/telescope.nvim", tag = '0.1.0',
|
||||
-- or , branch = '0.1.x',
|
||||
requires = { { "nvim-lua/plenary.nvim" } },
|
||||
config = function() require('plugins.telescope') end
|
||||
}
|
||||
|
||||
use { "tpope/vim-surround" }
|
||||
|
||||
use { "startup-nvim/startup.nvim",
|
||||
requires = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
require("startup").setup { theme = "dashboard" }
|
||||
end,
|
||||
}
|
||||
|
||||
end,
|
||||
|
||||
config = {
|
||||
auto_clean = true,
|
||||
compile_on_sync = true,
|
||||
git = { clone_timeout = 6000 },
|
||||
display = {
|
||||
working_sym = "ﲊ",
|
||||
error_sym = "✗ ",
|
||||
done_sym = " ",
|
||||
removed_sym = " ",
|
||||
moved_sym = "",
|
||||
},
|
||||
}
|
||||
})
|
|
@ -8,11 +8,12 @@ if not present then
|
|||
end
|
||||
|
||||
local options = {
|
||||
ensure_installed = {"lua", "haskell", "rust", },
|
||||
ensure_installed = { "lua", "haskell", "rust", "markdown", "markdown_inline" },
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
use_languagetree = true,
|
||||
additional_vim_regex_highlighting = { "markdown" },
|
||||
},
|
||||
|
||||
indent = {
|
||||
|
|
Loading…
Reference in a new issue