batman
This commit is contained in:
commit
6e42660d6d
24 changed files with 2163 additions and 0 deletions
17
.gitignore
vendored
Normal file
17
.gitignore
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
# ---> Linux
|
||||
*~
|
||||
|
||||
# temporary files which can be created if a process still has a handle open of a deleted file
|
||||
.fuse_hidden*
|
||||
|
||||
# KDE directory preferences
|
||||
.directory
|
||||
|
||||
# Linux trash folder which might appear on any partition or disk
|
||||
.Trash-*
|
||||
|
||||
# .nfs files are created when an open file is removed but is still being accessed
|
||||
.nfs*
|
||||
|
||||
lazy-lock.json
|
||||
cd-project.nvim.json
|
100
.vimrc
Normal file
100
.vimrc
Normal file
|
@ -0,0 +1,100 @@
|
|||
" minivimrc
|
||||
"
|
||||
" Minimal VIM configuration that does not depend on any 3rd party / plugins etc.
|
||||
" to drop into foreign boxes
|
||||
" based on my regular [.vimrc](https://github.com/hannenz/dotfiles/files/.vimrc)
|
||||
" as of 2019-08-22
|
||||
"
|
||||
set nocompatible
|
||||
|
||||
filetype plugin indent on " filetype detection[ON] plugin[ON] indent[OFF]
|
||||
syntax enable " enable syntax highlighting (previously syntax on).
|
||||
|
||||
colorscheme habamax
|
||||
|
||||
set path+=**
|
||||
set wildmenu
|
||||
set relativenumber
|
||||
set hidden " allows to change bufferfs even if there are unsaved changes
|
||||
set laststatus=2 " last window always has a statusline
|
||||
set nohlsearch " Don't continue to highlight searched phrases.
|
||||
set incsearch " But do highlight as you type your search.
|
||||
"set ruler " Always show info along bottom.
|
||||
set autoindent
|
||||
set previewheight=30
|
||||
set textwidth=80 " text width to hard-fold (gq)
|
||||
set tabstop=2
|
||||
set noexpandtab
|
||||
set shiftwidth=2
|
||||
set ignorecase " ignorecase must be set for smartcase to work -- wtf?
|
||||
set smartcase " smartcase in search: case sensitive as soon as a capital letter is in the query
|
||||
set nowrap " don't wrap text
|
||||
set wildmode=longest,list " Tab-completion like in bash
|
||||
set lazyredraw " Don't redraw the screen when executing macros etc.
|
||||
set splitright
|
||||
set splitbelow
|
||||
set autoread " Re-read file if it has been edited outside vim and not inside
|
||||
set scrolloff=6 " Keep at least 6 line visible at top/bottom when scrolling
|
||||
if &listchars ==# 'eol:$'
|
||||
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
|
||||
endif
|
||||
set timeout timeoutlen=5000 ttimeoutlen=100
|
||||
set backspace=indent,eol,start
|
||||
set foldmethod=manual
|
||||
set formatoptions-=t
|
||||
" Sane line joins
|
||||
if v:version > 703 || v:version == 703 && has('patch541')
|
||||
set formatoptions+=j
|
||||
endif
|
||||
|
||||
if has('patch-8.1.360')
|
||||
set diffopt=filler,internal,vertical,algorithm:patience,indent-heuristic " Always vertical diffs
|
||||
endif
|
||||
|
||||
let mapleader=' '
|
||||
let g:netrw_banner = 0 " Disable banner of netrw
|
||||
let g:netrw_liststyle = 3 " Tree view
|
||||
let g:netrw_winsize = -40 " Window size
|
||||
|
||||
augroup my_indent_options
|
||||
autocmd!
|
||||
autocmd FileType * setlocal noexpandtab
|
||||
autocmd FileType * setlocal shiftwidth=2
|
||||
augroup END
|
||||
augroup text_wrap
|
||||
autocmd!
|
||||
autocmd FileType txt,markdown, setlocal textwidth=70
|
||||
autocmd FileType txt,markdown, setlocal formatoptions+=t
|
||||
augroup END
|
||||
|
||||
imap jj <Esc>
|
||||
imap kj <Esc>
|
||||
imap jk <Esc>
|
||||
nmap <C-s> :w<CR>
|
||||
imap <C-s> <Esc>:w<CR>a
|
||||
|
||||
" fileexplorer
|
||||
nnoremap <Leader>e :Lexplore<CR>
|
||||
nnoremap <Leader>lf :Lexplore<CR>
|
||||
|
||||
" nnoremap <Leader>b :ls<CR>:b
|
||||
nnoremap <Leader><Leader> :ls<CR>:b
|
||||
|
||||
iabbrev </ </<C-X><C-O>
|
||||
|
||||
|
||||
"Use 24-bit (true-color) mode in Vim/Neovim when outside tmux.
|
||||
"If you're using tmux version 2.2 or later, you can remove the outermost $TMUX check and use tmux's 24-bit color support
|
||||
"(see < http://sunaku.github.io/tmux-24bit-color.html#usage > for more information.)
|
||||
if (empty($TMUX) && getenv('TERM_PROGRAM') != 'Apple_Terminal')
|
||||
if (has("nvim"))
|
||||
"For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 >
|
||||
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
|
||||
endif
|
||||
"For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 >
|
||||
"Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
|
||||
" < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
|
||||
if (has("termguicolors"))
|
||||
set termguicolors
|
||||
endif
|
||||
endif
|
44
init.lua
Normal file
44
init.lua
Normal file
|
@ -0,0 +1,44 @@
|
|||
require("pika.core")
|
||||
require("pika.lazy")
|
||||
|
||||
-- ─< Call the function to set the desired colorscheme >────────────────────────────────
|
||||
-- ╭──────────────────────────────────────────────────────╮
|
||||
-- │ themes are under ./lua/pika/plugins/colorschemes.lua │
|
||||
-- ╰──────────────────────────────────────────────────────╯
|
||||
|
||||
vim.cmd.colorscheme("oldschool")
|
||||
|
||||
-- Keybind for saving clipboard screenshot and inserting a Markdown link
|
||||
vim.api.nvim_set_keymap("n", "<leader>ps", ":lua SaveScreenshotAndInsertLink()<CR>", { noremap = true, silent = true })
|
||||
|
||||
function SaveScreenshotAndInsertLink()
|
||||
-- Prompt for Hugo base directory if needed
|
||||
|
||||
-- Define the Hugo base directory and screenshot subfolder path
|
||||
local base_dir
|
||||
local current_file_dir = vim.fn.expand("%:p:h")
|
||||
|
||||
-- Detect base dir by looking for the Hugo structure, or prompt if not found
|
||||
if current_file_dir:match("/content/") then
|
||||
base_dir = current_file_dir:match("(.*)/content/")
|
||||
else
|
||||
-- Prompt for Hugo base directory if automatic detection fails
|
||||
base_dir = vim.fn.input("Enter base directory of your Hugo site: ", "", "file")
|
||||
end
|
||||
|
||||
local img_folder = base_dir .. "/static/images/screenshots/"
|
||||
vim.fn.mkdir(img_folder, "p") -- Ensure the directory exists
|
||||
|
||||
-- Define the image name and full path
|
||||
local img_name = os.date("%Y-%m-%d_%H-%M-%S") .. ".png"
|
||||
local full_path = img_folder .. img_name
|
||||
|
||||
-- Save clipboard image as binary PNG file using wl-paste
|
||||
os.execute("wl-paste --type image/png > " .. full_path)
|
||||
|
||||
-- Insert markdown image link at cursor position
|
||||
local img_markdown = "\n"
|
||||
vim.api.nvim_put({ img_markdown }, "c", true, true)
|
||||
|
||||
print("Screenshot saved and link added: " .. full_path)
|
||||
end
|
2
lua/pika/core/init.lua
Normal file
2
lua/pika/core/init.lua
Normal file
|
@ -0,0 +1,2 @@
|
|||
require("pika.core.options")
|
||||
require("pika.core.keymaps")
|
82
lua/pika/core/keymaps.lua
Normal file
82
lua/pika/core/keymaps.lua
Normal file
|
@ -0,0 +1,82 @@
|
|||
vim.g.mapleader = " "
|
||||
|
||||
-- ─< lua/keymaps.lua >─────────────────────────────────────────────────────────────────
|
||||
local nomap = vim.keymap.set
|
||||
nomap("i", "<C-k>", "")
|
||||
nomap("n", "<C-k>", "")
|
||||
nomap("n", "q", "")
|
||||
nomap("v", "q", "")
|
||||
nomap("v", "<leader>S", "")
|
||||
|
||||
local map = vim.keymap.set
|
||||
|
||||
map("n", "<Esc>", "<cmd>nohlsearch<CR>")
|
||||
|
||||
-- ─< Comment >─────────────────────────────────────────────────────────────────────────
|
||||
map("n", "<S-c>", "gcc", { desc = "comment toggle", remap = true })
|
||||
map("v", "<S-c>", "gc", { desc = "comment toggle", remap = true })
|
||||
|
||||
-- ─< Terminal >────────────────────────────────────────────────────────────────────────
|
||||
map("t", "<C-x>", "<C-\\><C-N>", { desc = "terminal escape terminal mode" })
|
||||
|
||||
-- ─< Movement while in "insert"-mode >─────────────────────────────────────────────────
|
||||
map("i", "<C-b>", "<ESC>^i", { desc = "move beginning of line" })
|
||||
map("i", "<C-e>", "<End>", { desc = "move end of line" })
|
||||
map("i", "<C-h>", "<Left>", { desc = "move left" })
|
||||
map("i", "<C-l>", "<Right>", { desc = "move right" })
|
||||
map("i", "<C-j>", "<Down>", { desc = "move down" })
|
||||
map("i", "<C-k>", "<Up>", { desc = "move up" })
|
||||
|
||||
map("n", ";", ":", { desc = "CMD enter command mode" })
|
||||
map("i", "jk", "<ESC>")
|
||||
map("i", "<C-c>", "<ESC>")
|
||||
map("n", "<C-c>", "<ESC>")
|
||||
map("v", "<C-c>", "<ESC>")
|
||||
|
||||
map("n", "<leader>x", "<cmd>bd!<CR>")
|
||||
|
||||
-- ─< Disable arrow keys in normal mode >───────────────────────────────────────────────
|
||||
map("n", "<left>", '<cmd>echo "Use h to move!!"<CR>')
|
||||
map("n", "<right>", '<cmd>echo "Use l to move!!"<CR>')
|
||||
map("n", "<up>", '<cmd>echo "Use k to move!!"<CR>')
|
||||
map("n", "<down>", '<cmd>echo "Use j to move!!"<CR>')
|
||||
|
||||
map("n", "<leader>l", "<C-w><C-l>", { desc = "Move focus to the right window" })
|
||||
map("n", "<leader>h", "<C-w><C-h>", { desc = "Move focus to the left window" })
|
||||
map("n", "<leader>j", "<C-w><C-j>", { desc = "Move focus to the lower window" })
|
||||
map("n", "<leader>k", "<C-w><C-k>", { desc = "Move focus to the upper window" })
|
||||
|
||||
-- map("n", "<leader>p", vim.cmd.Ex)
|
||||
map("n", "<leader>q", vim.cmd.q)
|
||||
map("n", "<leader>s", vim.cmd.w)
|
||||
map("n", "<C-s>", vim.cmd.w)
|
||||
|
||||
-- ─< rename word under cursor >───────────────────────────────────────────────────────────
|
||||
map("n", "<leader>R", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
|
||||
|
||||
-- window management
|
||||
map("n", "<leader>sv", "<C-w>v", { desc = "Split window vertically" }) -- split window vertically
|
||||
map("n", "<leader>sh", "<C-w>s", { desc = "Split window horizontally" }) -- split window horizontally
|
||||
|
||||
vim.keymap.set({ "n", "i" }, "<leader>tt", function()
|
||||
-- Frage den Shell-Command ab
|
||||
vim.ui.input({ prompt = "Shell Command: " }, function(cmd)
|
||||
if cmd == nil or cmd == "" then
|
||||
return
|
||||
end
|
||||
|
||||
local result = vim.fn.system(cmd)
|
||||
local exit_code = vim.v.shell_error
|
||||
|
||||
if exit_code ~= 0 then
|
||||
vim.notify("Shell Error:\n" .. result, vim.log.levels.ERROR, { title = "Shell Command Failed" })
|
||||
return
|
||||
end
|
||||
|
||||
local lines = vim.split(result, "\n", { trimempty = true })
|
||||
|
||||
-- Insert at cursor position
|
||||
local row, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
vim.api.nvim_buf_set_lines(0, row, row, false, lines)
|
||||
end)
|
||||
end, { desc = "Insert Shell Output at Cursor" })
|
85
lua/pika/core/options.lua
Normal file
85
lua/pika/core/options.lua
Normal file
|
@ -0,0 +1,85 @@
|
|||
vim.cmd("let g:netrw_liststyle = 3")
|
||||
|
||||
local o = vim.opt
|
||||
|
||||
o.relativenumber = true
|
||||
o.number = true
|
||||
|
||||
-- Minimal number of screen lines to keep above and below the cursor.
|
||||
o.scrolloff = 8
|
||||
|
||||
-- tabs & indentation
|
||||
o.tabstop = 2 -- 2 spaces for tabs (prettier default)
|
||||
o.shiftwidth = 2 -- 2 spaces for indent width
|
||||
o.softtabstop = 2
|
||||
-- o.tabstop = 4 -- for TitusWorkings
|
||||
-- o.shiftwidth = 4 -- for TitusWorkings
|
||||
-- o.softtabstop = 4 -- for TitusWorkings
|
||||
o.expandtab = true -- expand tab to spaces
|
||||
o.autoindent = true -- copy indent from current line when starting new one
|
||||
|
||||
o.mouse = "a"
|
||||
o.mousemoveevent = true
|
||||
o.wrap = false
|
||||
|
||||
-- search settings
|
||||
o.ignorecase = true -- ignore case when searching
|
||||
o.smartcase = true -- if you include mixed case in your search, assumes you want case-sensitive
|
||||
|
||||
o.cursorline = true
|
||||
|
||||
-- Don't show the mode, since it's already in the status line
|
||||
o.showmode = false
|
||||
|
||||
-- turn on termguicolors for tokyonight colorscheme to work
|
||||
-- (have to use iterm2 or any other true color terminal)
|
||||
o.termguicolors = true
|
||||
o.background = "dark" -- colorschemes that can be light or dark will be made dark
|
||||
o.signcolumn = "yes" -- show sign column so that text doesn't shift
|
||||
|
||||
-- backspace
|
||||
o.backspace = "indent,eol,start" -- allow backspace on indent, end of line or insert mode start position
|
||||
|
||||
-- clipboard
|
||||
o.clipboard:append("unnamedplus") -- use system clipboard as default register
|
||||
|
||||
-- split windows
|
||||
o.splitright = true -- split vertical window to the right
|
||||
o.splitbelow = true -- split horizontal window to the bottom
|
||||
o.splitkeep = "screen"
|
||||
o.laststatus = 3
|
||||
|
||||
-- turn off swapfile
|
||||
o.swapfile = false
|
||||
|
||||
-- Disable the tilde on empty lines
|
||||
o.fillchars = { eob = " " }
|
||||
|
||||
-- SudaRead automatic if file is inaccessible
|
||||
vim.g.suda_smart_edit = 1
|
||||
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
desc = "Highlight when yanking (copying) text",
|
||||
group = vim.api.nvim_create_augroup("kickstart-highlight-yank", { clear = true }),
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Set cursor to beam when entering Neovim
|
||||
vim.cmd([[
|
||||
augroup ChangeCursorShape
|
||||
autocmd!
|
||||
autocmd VimEnter * set guicursor=n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20
|
||||
autocmd VimLeave * set guicursor=a:ver25
|
||||
augroup END
|
||||
]])
|
||||
|
||||
if vim.g.neovide then
|
||||
-- vim.g.neovide_transparency = 0.35
|
||||
vim.g.neovide_transparency = 1
|
||||
vim.g.neovide_theme = "dark"
|
||||
vim.g.neovide_refresh_rate = 90
|
||||
vim.g.neovide_cursor_vfx_mode = "torpedo"
|
||||
vim.g.neovide_cursor_smooth_blink = true
|
||||
end
|
36
lua/pika/lazy.lua
Normal file
36
lua/pika/lazy.lua
Normal file
|
@ -0,0 +1,36 @@
|
|||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
{ import = "pika.plugins" },
|
||||
{ import = "pika.plugins.lsp" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "nord" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
78
lua/pika/plugins/colorschemes.lua
Normal file
78
lua/pika/plugins/colorschemes.lua
Normal file
|
@ -0,0 +1,78 @@
|
|||
return {
|
||||
{ "folke/tokyonight.nvim" },
|
||||
{ "fynnfluegge/monet.nvim", name = "monet" },
|
||||
{ "L-Colombo/oldschool.nvim", config = "true" },
|
||||
-- { "catppuccin/nvim", name = "catppuccin" },
|
||||
-- { "EdenEast/nightfox.nvim" },
|
||||
-- { "DanWlker/primeppuccin", name = "primeppuccin" },
|
||||
-- { "rose-pine/neovim", name = "rose-pine" },
|
||||
{ "AlexvZyl/nordic.nvim" },
|
||||
{ "eldritch-theme/eldritch.nvim" },
|
||||
-- { "sainnhe/sonokai" },
|
||||
{ "samharju/synthweave.nvim" },
|
||||
{ "sainnhe/gruvbox-material" },
|
||||
{ "pauchiner/pastelnight.nvim" },
|
||||
{ "ptdewey/darkearth-nvim" },
|
||||
{ "marko-cerovac/material.nvim" },
|
||||
-- {
|
||||
-- "ferdinandrau/lavish.nvim",
|
||||
-- opts = {
|
||||
-- style = {
|
||||
-- italic_comments = false,
|
||||
-- italic_strings = false,
|
||||
-- transparent = false,
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
{
|
||||
"neko-night/nvim",
|
||||
lazy = false,
|
||||
-- priority = 1000,
|
||||
opts = {
|
||||
transparent = false, -- Enable this to disable setting the background color
|
||||
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
|
||||
styles = {
|
||||
-- Style to be applied to different syntax groups
|
||||
-- Value is any valid attr-list value for `:help nvim_set_hl`
|
||||
comments = { italic = true },
|
||||
keywords = { italic = true },
|
||||
functions = { bold = true },
|
||||
variables = { bold = true },
|
||||
-- Background styles. Can be "dark", "transparent" or "normal"
|
||||
sidebars = "dark", -- style for sidebars, see below
|
||||
floats = "dark", -- style for floating windows
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"scottmckendry/cyberdream.nvim",
|
||||
name = "cyberdream",
|
||||
lazy = false,
|
||||
opts = {
|
||||
transparent = true,
|
||||
hide_fillchars = true,
|
||||
terminal_colors = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
"ribru17/bamboo.nvim",
|
||||
opts = {
|
||||
-- ────────────────────────────< optional configuration here >─────────────────────────
|
||||
code_style = {
|
||||
comments = { italic = false, bold = true },
|
||||
conditionals = { italic = true },
|
||||
keywords = { bold = true },
|
||||
functions = {},
|
||||
namespaces = { italic = true },
|
||||
parameters = { italic = true },
|
||||
strings = {},
|
||||
variables = { bold = true },
|
||||
},
|
||||
-- ─< Custom Highlights -- >────────────────────────────────────────────────────────────
|
||||
colors = {}, -- Override default colors
|
||||
highlights = { -- Override highlight groups
|
||||
["@comment"] = { fg = "#555653" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
128
lua/pika/plugins/dashboard.lua
Normal file
128
lua/pika/plugins/dashboard.lua
Normal file
|
@ -0,0 +1,128 @@
|
|||
return {
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
lazy = false, -- As https://github.com/nvimdev/dashboard-nvim/pull/450, dashboard-nvim shouldn't be lazy-loaded to properly handle stdin.
|
||||
opts = function()
|
||||
local logo = [[
|
||||
▐ ▄ ▄▄▄ . ▌ ▐·▪ • ▌ ▄ ·.
|
||||
•█▌▐█▀▄.▀·▪ ▪█·█▌██ ·██ ▐███▪
|
||||
▐█▐▐▌▐▀▀▪▄ ▄█▀▄ ▐█▐█•▐█·▐█ ▌▐▌▐█·
|
||||
██▐█▌▐█▄▄▌▐█▌.▐▌ ███ ▐█▌██ ██▌▐█▌
|
||||
▀▀ █▪ ▀▀▀ ▀█▄▀▪. ▀ ▀▀▀▀▀ █▪▀▀▀
|
||||
]]
|
||||
|
||||
-- local logo = [[
|
||||
--
|
||||
-- ████ ██████ █████ ██
|
||||
-- ███████████ █████
|
||||
-- █████████ ███████████████████ ███ ███████████
|
||||
-- █████████ ███ █████████████ █████ ██████████████
|
||||
-- █████████ ██████████ █████████ █████ █████ ████ █████
|
||||
-- ███████████ ███ ███ █████████ █████ █████ ████ █████
|
||||
-- ██████ █████████████████████ ████ █████ █████ ████ ██████
|
||||
-- ]]
|
||||
|
||||
logo = string.rep("\n", 8) .. logo .. "\n\n"
|
||||
|
||||
local opts = {
|
||||
theme = "doom",
|
||||
hide = {
|
||||
statusline = false,
|
||||
},
|
||||
config = {
|
||||
header = vim.split(logo, "\n"),
|
||||
center = {
|
||||
{
|
||||
action = function()
|
||||
require("telescope.builtin").find_files()
|
||||
end,
|
||||
desc = " Find File",
|
||||
icon = " ",
|
||||
key = "f",
|
||||
},
|
||||
{ action = "ene | startinsert", desc = " New File", icon = " ", key = "n" },
|
||||
{
|
||||
action = function()
|
||||
require("telescope.builtin").oldfiles()
|
||||
end,
|
||||
desc = " Recent Files",
|
||||
icon = " ",
|
||||
key = "r",
|
||||
},
|
||||
{
|
||||
action = function()
|
||||
require("telescope.builtin").live_grep()
|
||||
end,
|
||||
desc = " Find Text",
|
||||
icon = " ",
|
||||
key = "g",
|
||||
},
|
||||
{
|
||||
action = function()
|
||||
require("telescope.builtin").find_files({ cwd = vim.fn.stdpath("config") })
|
||||
end,
|
||||
desc = " Search Neovim files",
|
||||
icon = " ",
|
||||
key = "c",
|
||||
},
|
||||
{
|
||||
action = 'lua require("persistence").load()',
|
||||
desc = " Restore Session",
|
||||
icon = " ",
|
||||
key = "s",
|
||||
},
|
||||
-- { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" },
|
||||
{ action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
||||
{
|
||||
action = function()
|
||||
vim.api.nvim_input("<cmd>qa<cr>")
|
||||
end,
|
||||
desc = " Quit",
|
||||
icon = " ",
|
||||
key = "q",
|
||||
},
|
||||
},
|
||||
footer = function()
|
||||
local stats = require("lazy").stats()
|
||||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||
return {
|
||||
"⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms",
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
for _, button in ipairs(opts.config.center) do
|
||||
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
||||
button.key_format = " %s"
|
||||
end
|
||||
|
||||
-- open dashboard after closing lazy
|
||||
if vim.o.filetype == "lazy" then
|
||||
vim.api.nvim_create_autocmd("WinClosed", {
|
||||
pattern = tostring(vim.api.nvim_get_current_win()),
|
||||
once = true,
|
||||
callback = function()
|
||||
vim.schedule(function()
|
||||
vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" })
|
||||
end)
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
return opts
|
||||
end,
|
||||
dependencies = {
|
||||
"folke/persistence.nvim",
|
||||
event = "BufReadPre",
|
||||
opts = {},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>qs", function() require("persistence").load() end, desc = "Restore Session" },
|
||||
{ "<leader>ql", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" },
|
||||
{ "<leader>qd", function() require("persistence").stop() end, desc = "Don't Save Current Session" },
|
||||
{ "<leader>db", "<cmd>:Dashboard<CR>", desc = "Dashboard"}
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
125
lua/pika/plugins/explorer.lua
Normal file
125
lua/pika/plugins/explorer.lua
Normal file
|
@ -0,0 +1,125 @@
|
|||
return {
|
||||
-- ─< neotree - fallback >────────────────────────────────────────────────────────────────────────
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||
"MunifTanjim/nui.nvim",
|
||||
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
|
||||
},
|
||||
vim.keymap.set("n", "<leader>e", "<CMD>:Neotree toggle<CR>"),
|
||||
vim.keymap.set("n", "<leader>Ee", "<CMD>:Neotree left<CR>"),
|
||||
vim.keymap.set("n", "<leader>Ef", "<CMD>:Neotree float<CR>"),
|
||||
vim.keymap.set("n", "<leader>Eg", "<CMD>:Neotree git_status float<CR>"),
|
||||
vim.keymap.set("n", "<leader>Eb", "<CMD>:Neotree buffers position=top<CR>"),
|
||||
},
|
||||
|
||||
---@type LazySpec
|
||||
{
|
||||
"mikavilpas/yazi.nvim",
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
-- 👇 in this section, choose your own keymappings!
|
||||
-- {
|
||||
-- "<leader>lf",
|
||||
-- "<cmd>Yazi<cr>",
|
||||
-- desc = "Open yazi at the current file",
|
||||
-- },
|
||||
{
|
||||
-- Open in the current working directory
|
||||
"<leader>Lf",
|
||||
"<cmd>Yazi cwd<cr>",
|
||||
desc = "Open the file manager in nvim's working directory",
|
||||
},
|
||||
{
|
||||
-- NOTE: this requires a version of yazi that includes
|
||||
-- https://github.com/sxyazi/yazi/pull/1305 from 2024-07-18
|
||||
"<leader>lf",
|
||||
"<cmd>Yazi toggle<cr>",
|
||||
desc = "Resume the last yazi session",
|
||||
},
|
||||
},
|
||||
---@type YaziConfig
|
||||
opts = {
|
||||
-- if you want to open yazi instead of netrw, see below for more info
|
||||
open_for_directories = true,
|
||||
keymaps = {
|
||||
show_help = "<f1>",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- {
|
||||
-- "kelly-lin/ranger.nvim",
|
||||
-- config = function()
|
||||
-- local ranger_nvim = require("ranger-nvim")
|
||||
-- ranger_nvim.setup({
|
||||
-- enable_cmds = false,
|
||||
-- replace_netrw = false,
|
||||
-- keybinds = {
|
||||
-- ["<C-v>"] = ranger_nvim.OPEN_MODE.vsplit,
|
||||
-- ["<C-h>"] = ranger_nvim.OPEN_MODE.split,
|
||||
-- ["ot"] = ranger_nvim.OPEN_MODE.tabedit,
|
||||
-- ["or"] = ranger_nvim.OPEN_MODE.rifle,
|
||||
-- },
|
||||
-- ui = {
|
||||
-- border = "none",
|
||||
-- height = 0.7,
|
||||
-- width = 0.7,
|
||||
-- x = 0.5,
|
||||
-- y = 0.5,
|
||||
-- },
|
||||
-- })
|
||||
-- require("ranger-nvim").setup({ replace_netrw = true })
|
||||
-- vim.api.nvim_set_keymap("n", "<leader>lf", "", {
|
||||
-- noremap = true,
|
||||
-- callback = function()
|
||||
-- require("ranger-nvim").open(true)
|
||||
-- end,
|
||||
-- })
|
||||
-- end,
|
||||
-- },
|
||||
|
||||
-- {
|
||||
-- "lmburns/lf.nvim",
|
||||
-- dependencies = {
|
||||
-- "akinsho/toggleterm.nvim",
|
||||
-- },
|
||||
-- config = function()
|
||||
-- -- This feature will not work if the plugin is lazy-loaded
|
||||
-- vim.g.lf_netrw = 1
|
||||
--
|
||||
-- require("lf").setup({
|
||||
-- default_action = "drop", -- default action when `Lf` opens a file
|
||||
-- default_actions = { -- default action keybindings
|
||||
-- ["<C-t>"] = "tabedit",
|
||||
-- ["<C-x>"] = "split",
|
||||
-- ["<C-v>"] = "vsplit",
|
||||
-- ["<C-o>"] = "tab drop",
|
||||
-- },
|
||||
-- winblend = 30, -- psuedotransparency level
|
||||
-- direction = "float", -- window type: float horizontal vertical
|
||||
-- border = "curved", -- border kind: single double shadow curved
|
||||
-- escape_quit = true, -- map escape to the quit command (so it doesn't go into a meta normal mode)
|
||||
-- focus_on_open = true, -- focus the current file when opening Lf (experimental)
|
||||
-- mappings = true, -- whether terminal buffer mapping is enabled
|
||||
-- tmux = false, -- tmux statusline can be disabled on opening of Lf
|
||||
-- default_file_manager = true, -- make lf default file manager
|
||||
-- disable_netrw_warning = true, -- don't display a message when opening a directory with `default_file_manager` as true
|
||||
-- })
|
||||
--
|
||||
-- -- Set keymap for Lf
|
||||
-- vim.keymap.set("n", "<leader>lf", "<Cmd>Lf<CR>")
|
||||
--
|
||||
-- -- Create autocmd for LfTermEnter
|
||||
-- vim.api.nvim_create_autocmd("User", {
|
||||
-- pattern = "LfTermEnter",
|
||||
-- callback = function(a)
|
||||
-- vim.api.nvim_buf_set_keymap(a.buf, "t", "q", "q", { nowait = true })
|
||||
-- end,
|
||||
-- })
|
||||
-- end,
|
||||
-- },
|
||||
}
|
212
lua/pika/plugins/git.lua
Normal file
212
lua/pika/plugins/git.lua
Normal file
|
@ -0,0 +1,212 @@
|
|||
return {
|
||||
{
|
||||
"tanvirtin/vgit.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim", "nvim-tree/nvim-web-devicons" },
|
||||
-- Lazy loading on 'VimEnter' event is necessary.
|
||||
event = "VimEnter",
|
||||
config = function()
|
||||
require("vgit").setup(
|
||||
-- keymaps = {
|
||||
-- ["n <C-k>"] = {
|
||||
-- function()
|
||||
-- require("vgit").hunk_up()
|
||||
-- end,
|
||||
-- desc = "VGit Hunk Up",
|
||||
-- },
|
||||
-- ["n <C-j>"] = {
|
||||
-- function()
|
||||
-- require("vgit").hunk_down()
|
||||
-- end,
|
||||
-- desc = "VGit Hunk Down",
|
||||
-- },
|
||||
-- ["n <leader>gs"] = {
|
||||
-- function()
|
||||
-- require("vgit").buffer_hunk_stage()
|
||||
-- end,
|
||||
-- desc = "VGit Stage Hunk",
|
||||
-- },
|
||||
-- ["n <leader>gr"] = {
|
||||
-- function()
|
||||
-- require("vgit").buffer_hunk_reset()
|
||||
-- end,
|
||||
-- desc = "VGit Reset Hunk",
|
||||
-- },
|
||||
-- ["n <leader>gp"] = {
|
||||
-- function()
|
||||
-- require("vgit").buffer_hunk_preview()
|
||||
-- end,
|
||||
-- desc = "VGit Preview Hunk",
|
||||
-- },
|
||||
-- ["n <leader>gb"] = {
|
||||
-- function()
|
||||
-- require("vgit").buffer_blame_preview()
|
||||
-- end,
|
||||
-- desc = "VGit Blame Preview",
|
||||
-- },
|
||||
-- ["n <leader>gf"] = {
|
||||
-- function()
|
||||
-- require("vgit").buffer_diff_preview()
|
||||
-- end,
|
||||
-- desc = "VGit Diff Preview",
|
||||
-- },
|
||||
-- ["n <leader>gh"] = {
|
||||
-- function()
|
||||
-- require("vgit").buffer_history_preview()
|
||||
-- end,
|
||||
-- desc = "VGit History Preview",
|
||||
-- },
|
||||
-- ["n <leader>gu"] = {
|
||||
-- function()
|
||||
-- require("vgit").buffer_reset()
|
||||
-- end,
|
||||
-- desc = "VGit Reset Buffer",
|
||||
-- },
|
||||
-- ["n <leader>gcm"] = {
|
||||
-- function()
|
||||
-- require("vgit").project_commit_preview()
|
||||
-- end,
|
||||
-- desc = "VGit Commit Preview",
|
||||
-- },
|
||||
-- ["n <leader>gcc"] = {
|
||||
-- function()
|
||||
-- require("vgit").project_commits_preview()
|
||||
-- end,
|
||||
-- desc = "VGit Commits Preview",
|
||||
-- },
|
||||
-- ["n <leader>gcl"] = {
|
||||
-- function()
|
||||
-- require("vgit").project_logs_preview()
|
||||
-- end,
|
||||
-- desc = "VGit Logs Preview",
|
||||
-- },
|
||||
-- ["n <leader>gd"] = {
|
||||
-- function()
|
||||
-- require("vgit").project_diff_preview()
|
||||
-- end,
|
||||
-- desc = "VGit Project Diff",
|
||||
-- },
|
||||
-- ["n <leader>gx"] = {
|
||||
-- function()
|
||||
-- require("vgit").toggle_diff_preference()
|
||||
-- end,
|
||||
-- desc = "VGit Toggle Diff Preference",
|
||||
-- },
|
||||
-- },
|
||||
)
|
||||
end,
|
||||
|
||||
vim.keymap.set("n", "<C-k>", function()
|
||||
require("vgit").hunk_up()
|
||||
end, { desc = "VGit Hunk Up" }),
|
||||
|
||||
vim.keymap.set("n", "<C-j>", function()
|
||||
require("vgit").hunk_down()
|
||||
end, { desc = "VGit Hunk Down" }),
|
||||
|
||||
vim.keymap.set("n", "<leader>gs", function()
|
||||
require("vgit").buffer_hunk_stage()
|
||||
end, { desc = "VGit Stage Hunk" }),
|
||||
|
||||
vim.keymap.set("n", "<leader>gr", function()
|
||||
require("vgit").buffer_hunk_reset()
|
||||
end, { desc = "VGit Reset Hunk" }),
|
||||
|
||||
vim.keymap.set("n", "<leader>gp", function()
|
||||
require("vgit").buffer_hunk_preview()
|
||||
end, { desc = "VGit Preview Hunk" }),
|
||||
|
||||
vim.keymap.set("n", "<leader>gb", function()
|
||||
require("vgit").buffer_blame_preview()
|
||||
end, { desc = "VGit Blame Preview" }),
|
||||
|
||||
vim.keymap.set("n", "<leader>gf", function()
|
||||
require("vgit").buffer_diff_preview()
|
||||
end, { desc = "VGit Diff Preview" }),
|
||||
|
||||
vim.keymap.set("n", "<leader>gh", function()
|
||||
require("vgit").buffer_history_preview()
|
||||
end, { desc = "VGit History Preview" }),
|
||||
|
||||
vim.keymap.set("n", "<leader>gu", function()
|
||||
require("vgit").buffer_reset()
|
||||
end, { desc = "VGit Reset Buffer" }),
|
||||
|
||||
vim.keymap.set("n", "<leader>gcm", function()
|
||||
require("vgit").project_commit_preview()
|
||||
end, { desc = "VGit Commit Preview" }),
|
||||
|
||||
vim.keymap.set("n", "<leader>gcc", function()
|
||||
require("vgit").project_commits_preview()
|
||||
end, { desc = "VGit Commits Preview" }),
|
||||
|
||||
vim.keymap.set("n", "<leader>gcl", function()
|
||||
require("vgit").project_logs_preview()
|
||||
end, { desc = "VGit Logs Preview" }),
|
||||
|
||||
vim.keymap.set("n", "<leader>gd", function()
|
||||
require("vgit").project_diff_preview()
|
||||
end, { desc = "VGit Project Diff" }),
|
||||
|
||||
vim.keymap.set("n", "<leader>gx", function()
|
||||
require("vgit").toggle_diff_preference()
|
||||
end, { desc = "VGit Toggle Diff Preference" }),
|
||||
},
|
||||
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = "┃" },
|
||||
change = { text = "┃" },
|
||||
delete = { text = "_" },
|
||||
topdelete = { text = "‾" },
|
||||
changedelete = { text = "~" },
|
||||
untracked = { text = "┆" },
|
||||
},
|
||||
signs_staged = {
|
||||
add = { text = "┃" },
|
||||
change = { text = "┃" },
|
||||
delete = { text = "_" },
|
||||
topdelete = { text = "‾" },
|
||||
changedelete = { text = "~" },
|
||||
untracked = { text = "┆" },
|
||||
},
|
||||
signs_staged_enable = true,
|
||||
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
|
||||
numhl = true, -- Toggle with `:Gitsigns toggle_numhl`
|
||||
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
||||
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
||||
watch_gitdir = {
|
||||
follow_files = true,
|
||||
},
|
||||
auto_attach = true,
|
||||
attach_to_untracked = false,
|
||||
current_line_blame = true, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 300,
|
||||
ignore_whitespace = true,
|
||||
virt_text_priority = 100,
|
||||
},
|
||||
current_line_blame_formatter = "<author>, <author_time:%R> - <summary>",
|
||||
sign_priority = 6,
|
||||
update_debounce = 100,
|
||||
status_formatter = nil, -- Use default
|
||||
max_file_length = 40000, -- Disable if file is longer than this (in lines)
|
||||
preview_config = {
|
||||
-- Options passed to nvim_open_win
|
||||
border = "single",
|
||||
style = "minimal",
|
||||
relative = "cursor",
|
||||
row = 0,
|
||||
col = 1,
|
||||
},
|
||||
|
||||
vim.keymap.set("n", "<leader>gr", "<cmd>Gitsigns refresh<CR>", { desc = "Gitsigns Refresh" }),
|
||||
vim.keymap.set("n", "<leader>gs", "<cmd>Gitsigns toggle_signs<CR>", { desc = "Gitsigns ToggleSigns" }),
|
||||
vim.keymap.set("n", "<leader>gl", "<cmd>Gitsigns toggle_linehl<CR>", { desc = "Gitsigns ToggleLine" }),
|
||||
vim.keymap.set("n", "<leader>gw", "<cmd>Gitsigns toggle_word_diff<CR>", { desc = "Gitsigns ToggleWord" }),
|
||||
},
|
||||
},
|
||||
}
|
32
lua/pika/plugins/init.lua
Normal file
32
lua/pika/plugins/init.lua
Normal file
|
@ -0,0 +1,32 @@
|
|||
return {
|
||||
"nvim-lua/plenary.nvim", -- lua functions that many plugins use
|
||||
"christoomey/vim-tmux-navigator", -- tmux & split window navigation
|
||||
"dstein64/nvim-scrollview",
|
||||
"folke/lsp-colors.nvim",
|
||||
"jghauser/mkdir.nvim",
|
||||
"jghauser/follow-md-links.nvim",
|
||||
"lambdalisue/vim-suda", -- open files with sudo if needed
|
||||
-- ╭───────────╮
|
||||
-- │ maximizer │
|
||||
-- ╰───────────╯
|
||||
{
|
||||
"szw/vim-maximizer",
|
||||
keys = {
|
||||
{ "<C-f>", "<cmd>MaximizerToggle<CR>", desc = "Maximize/minimize a split" },
|
||||
},
|
||||
},
|
||||
|
||||
-- ╭───────────────╮
|
||||
-- │ colored icons │
|
||||
-- ╰───────────────╯
|
||||
{
|
||||
"rachartier/tiny-devicons-auto-colors.nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("tiny-devicons-auto-colors").setup()
|
||||
end,
|
||||
},
|
||||
}
|
43
lua/pika/plugins/lsp/formatting.lua
Normal file
43
lua/pika/plugins/lsp/formatting.lua
Normal file
|
@ -0,0 +1,43 @@
|
|||
return {
|
||||
"stevearc/conform.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
local conform = require("conform")
|
||||
|
||||
conform.setup({
|
||||
formatters_by_ft = {
|
||||
-- javascript = { "prettier" },
|
||||
-- typescript = { "prettier" },
|
||||
-- javascriptreact = { "prettier" },
|
||||
-- typescriptreact = { "prettier" },
|
||||
svelte = { "prettier" },
|
||||
css = { "prettier" },
|
||||
html = { "prettier" },
|
||||
fish = { "fish_indent" },
|
||||
-- php = { "pretty-php" },
|
||||
json = { "yq" },
|
||||
yaml = { "yq" },
|
||||
markdown = { "prettier" },
|
||||
graphql = { "prettier" },
|
||||
-- liquid = { "prettier" },
|
||||
sh = { "shfmt" },
|
||||
zsh = { "shfmt" },
|
||||
batch = { "shfmt", "prettier" },
|
||||
lua = { "stylua" },
|
||||
},
|
||||
format_on_save = {
|
||||
lsp_fallback = false,
|
||||
async = false,
|
||||
timeout_ms = 1000,
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set({ "n", "v" }, "<leader>mp", function()
|
||||
conform.format({
|
||||
lsp_fallback = true,
|
||||
async = false,
|
||||
timeout_ms = 1000,
|
||||
})
|
||||
end, { desc = "Format file or range (in visual mode)" })
|
||||
end,
|
||||
}
|
132
lua/pika/plugins/lsp/lspconfig.lua
Normal file
132
lua/pika/plugins/lsp/lspconfig.lua
Normal file
|
@ -0,0 +1,132 @@
|
|||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = { "hrsh7th/cmp-nvim-lsp", "L3MON4D3/LuaSnip", "saadparwaiz1/cmp_luasnip" },
|
||||
},
|
||||
{ "antosha417/nvim-lsp-file-operations", config = true },
|
||||
{ "folke/neodev.nvim", opts = {} },
|
||||
},
|
||||
|
||||
config = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
local mason_lspconfig = require("mason-lspconfig")
|
||||
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||
local keymap = vim.keymap
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
||||
callback = function(ev)
|
||||
-- Buffer local mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
local opts = { buffer = ev.buf, silent = true }
|
||||
|
||||
opts.desc = "See available code actions"
|
||||
keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts) -- see available code actions, in visual mode will apply to selection
|
||||
|
||||
opts.desc = "Smart rename"
|
||||
keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts) -- smart rename
|
||||
|
||||
opts.desc = "Show buffer diagnostics"
|
||||
keymap.set("n", "<leader>D", "<cmd>Telescope diagnostics bufnr=0<CR>", opts) -- show diagnostics for file
|
||||
|
||||
opts.desc = "Show line diagnostics"
|
||||
keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts) -- show diagnostics for line
|
||||
|
||||
opts.desc = "Show documentation for what is under cursor"
|
||||
keymap.set("n", "K", vim.lsp.buf.hover, opts) -- show documentation for what is under cursor
|
||||
|
||||
opts.desc = "Restart LSP"
|
||||
keymap.set("n", "<leader>rs", ":LspRestart<CR>", opts) -- mapping to restart lsp if necessary
|
||||
end,
|
||||
})
|
||||
-- used to enable autocompletion (assign to every lsp server config)
|
||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||
|
||||
-- Change the Diagnostic symbols in the sign column (gutter)
|
||||
-- (not in youtube nvim video)
|
||||
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
||||
for type, icon in pairs(signs) do
|
||||
local hl = "DiagnosticSign" .. type
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
|
||||
end
|
||||
|
||||
mason_lspconfig.setup_handlers({
|
||||
function(server_name)
|
||||
lspconfig[server_name].setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
end,
|
||||
["svelte"] = function()
|
||||
lspconfig["svelte"].setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = function(client, bufnr)
|
||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||
pattern = { "*.js", "*.ts" },
|
||||
callback = function(ctx)
|
||||
client.notify("$/onDidChangeTsOrJsFile", { uri = ctx.match })
|
||||
end,
|
||||
})
|
||||
end,
|
||||
})
|
||||
end,
|
||||
["graphql"] = function()
|
||||
lspconfig["graphql"].setup({
|
||||
capabilities = capabilities,
|
||||
filetypes = { "graphql", "gql", "svelte", "typescriptreact", "javascriptreact" },
|
||||
})
|
||||
end,
|
||||
["emmet_ls"] = function()
|
||||
lspconfig["emmet_ls"].setup({
|
||||
capabilities = capabilities,
|
||||
filetypes = {
|
||||
"html",
|
||||
"typescriptreact",
|
||||
"javascriptreact",
|
||||
"css",
|
||||
"sass",
|
||||
"scss",
|
||||
"less",
|
||||
"svelte",
|
||||
},
|
||||
})
|
||||
end,
|
||||
["lua_ls"] = function()
|
||||
lspconfig["lua_ls"].setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" },
|
||||
},
|
||||
completion = {
|
||||
callSnippet = "Replace",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
["cssls"] = function()
|
||||
lspconfig["cssls"].setup({
|
||||
capabilities = capabilities,
|
||||
filetypes = { "css", "scss" },
|
||||
})
|
||||
end,
|
||||
["intelephense"] = function()
|
||||
lspconfig["intelephense"].setup({
|
||||
capabilities = capabilities,
|
||||
filetypes = { "php", "blade.php" },
|
||||
})
|
||||
end,
|
||||
-- ["tsserver"] = function()
|
||||
-- -- Replace tsserver with typescript-language-server
|
||||
-- lspconfig["typescript-language-server"].setup({
|
||||
-- capabilities = capabilities,
|
||||
-- filetypes = { "typescript", "typescriptreact", "javascript", "javascriptreact" },
|
||||
-- })
|
||||
-- end,
|
||||
})
|
||||
end,
|
||||
}
|
61
lua/pika/plugins/lsp/mason.lua
Normal file
61
lua/pika/plugins/lsp/mason.lua
Normal file
|
@ -0,0 +1,61 @@
|
|||
return {
|
||||
"williamboman/mason.nvim",
|
||||
dependencies = {
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
},
|
||||
config = function()
|
||||
-- import mason
|
||||
local mason = require("mason")
|
||||
|
||||
-- import mason-lspconfig
|
||||
local mason_lspconfig = require("mason-lspconfig")
|
||||
|
||||
local mason_tool_installer = require("mason-tool-installer")
|
||||
|
||||
-- enable mason and configure icons
|
||||
mason.setup({
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "",
|
||||
package_pending = "",
|
||||
package_uninstalled = "",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
mason_lspconfig.setup({
|
||||
-- list of servers for mason to install
|
||||
ensure_installed = {
|
||||
"html",
|
||||
"cssls",
|
||||
"svelte",
|
||||
"lua_ls",
|
||||
"emmet_ls",
|
||||
"hyprls",
|
||||
"yamlls",
|
||||
-- "intelephense",
|
||||
-- "graphql",
|
||||
-- "typos_lsp",
|
||||
-- "textlsp",
|
||||
-- "prismals",
|
||||
-- "pyright",
|
||||
-- "lemminx",
|
||||
-- "tailwindcss",
|
||||
},
|
||||
})
|
||||
|
||||
mason_tool_installer.setup({
|
||||
ensure_installed = {
|
||||
"shfmt",
|
||||
"prettier",
|
||||
"stylua",
|
||||
"blade-formatter",
|
||||
"html-lsp",
|
||||
"docker-compose-language-service",
|
||||
"pylint",
|
||||
"eslint_d",
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
139
lua/pika/plugins/lsp/nvim-cmp.lua
Normal file
139
lua/pika/plugins/lsp/nvim-cmp.lua
Normal file
|
@ -0,0 +1,139 @@
|
|||
return {
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
event = "InsertEnter",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-buffer", -- source for text in buffer
|
||||
"hrsh7th/cmp-path", -- source for file system paths
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
version = "v2.*", -- latest release of LuaSnip
|
||||
build = "make install_jsregexp", -- optional regex support for LuaSnip
|
||||
},
|
||||
"saadparwaiz1/cmp_luasnip", -- for autocompletion
|
||||
"rafamadriz/friendly-snippets", -- useful snippets
|
||||
"onsails/lspkind.nvim", -- vs-code like pictograms
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
local lspkind = require("lspkind")
|
||||
|
||||
-- Load snippets from friendly-snippets and custom directory
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
require("luasnip.loaders.from_vscode").lazy_load({ paths = { "~/.config/nvim/snippets" } })
|
||||
|
||||
cmp.setup({
|
||||
completion = {
|
||||
completeopt = "menu,menuone,preview,noselect",
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
-- ["<C-x>"] = cmp.mapping({
|
||||
-- cmp.mapping.complete({
|
||||
-- config = {
|
||||
-- sources = cmp.config.sources({
|
||||
-- { name = "cmp_ai" },
|
||||
-- }),
|
||||
-- },
|
||||
-- }),
|
||||
-- { "i" },
|
||||
-- }),
|
||||
|
||||
["<C-k>"] = cmp.mapping.select_prev_item(), -- previous suggestion
|
||||
["<C-j>"] = cmp.mapping.select_next_item(), -- next suggestion
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
|
||||
["<C-e>"] = cmp.mapping.abort(), -- close completion window
|
||||
["<CR>"] = cmp.mapping.confirm({ select = false }),
|
||||
|
||||
-- Tab to complete
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.confirm({ select = true }) -- confirm selection
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
-- sources for autocompletion
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" }, -- snippets
|
||||
{ name = "buffer" }, -- text within current buffer
|
||||
{ name = "path" }, -- file system paths
|
||||
-- { name = "cmp_ai" }, -- AI completion
|
||||
}),
|
||||
-- configure lspkind for vs-code like pictograms in completion menu
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
mode = "symbol_text", -- show symbol text with icons
|
||||
maxwidth = 130,
|
||||
ellipsis_char = "...",
|
||||
}),
|
||||
},
|
||||
-- Enable rounded borders
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
experimental = {
|
||||
ghost_text = true, -- This enables the inline ghost text
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- {
|
||||
-- -- ─< for ai use >──────────────────────────────────────────────────────────────────────
|
||||
-- "tzachar/cmp-ai",
|
||||
-- dependencies = {
|
||||
-- "hrsh7th/nvim-cmp",
|
||||
-- "tzachar/cmp-ai",
|
||||
-- },
|
||||
--
|
||||
-- config = function()
|
||||
-- local cmp = require("cmp")
|
||||
-- local cmp_ai = require("cmp_ai.config")
|
||||
--
|
||||
-- -- Setup cmp-ai configuration
|
||||
-- cmp_ai:setup({
|
||||
-- max_lines = 100,
|
||||
-- provider = "Ollama",
|
||||
-- -- provider_options = {
|
||||
-- -- model = "codellama:7b-code",
|
||||
-- -- auto_unload = false,
|
||||
-- -- raw_response_cb = function(response)
|
||||
-- -- vim.notify(vim.inspect(response))
|
||||
-- -- vim.g.ai_raw_response = response
|
||||
-- -- end,
|
||||
-- -- },
|
||||
-- provider_options = {
|
||||
-- model = "qwen2.5-coder:7b-base-q6_K",
|
||||
-- prompt = function(lines_before, lines_after)
|
||||
-- return "<|fim_prefix|>" .. lines_before .. "<|fim_suffix|>" .. lines_after .. "<|fim_middle|>"
|
||||
-- end,
|
||||
-- raw_response_cb = function(response)
|
||||
-- vim.notify(vim.inspect(response))
|
||||
-- vim.g.ai_raw_response = response
|
||||
-- end,
|
||||
-- },
|
||||
-- notify = true,
|
||||
-- notify_callback = function(msg)
|
||||
-- vim.notify(msg)
|
||||
-- end,
|
||||
-- run_on_every_keystroke = true,
|
||||
-- ignored_file_types = {
|
||||
-- txt = true,
|
||||
-- },
|
||||
-- })
|
||||
-- end,
|
||||
-- },
|
||||
}
|
110
lua/pika/plugins/lsp/nvim-treesitter-text-objects.lua
Normal file
110
lua/pika/plugins/lsp/nvim-treesitter-text-objects.lua
Normal file
|
@ -0,0 +1,110 @@
|
|||
return {
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
lazy = true,
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
|
||||
-- Automatically jump forward to textobj, similar to targets.vim
|
||||
lookahead = true,
|
||||
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["a="] = { query = "@assignment.outer", desc = "Select outer part of an assignment" },
|
||||
["i="] = { query = "@assignment.inner", desc = "Select inner part of an assignment" },
|
||||
["l="] = { query = "@assignment.lhs", desc = "Select left hand side of an assignment" },
|
||||
["r="] = { query = "@assignment.rhs", desc = "Select right hand side of an assignment" },
|
||||
|
||||
-- works for javascript/typescript files (custom capture I created in after/queries/ecma/textobjects.scm)
|
||||
["a:"] = { query = "@property.outer", desc = "Select outer part of an object property" },
|
||||
["i:"] = { query = "@property.inner", desc = "Select inner part of an object property" },
|
||||
["l:"] = { query = "@property.lhs", desc = "Select left part of an object property" },
|
||||
["r:"] = { query = "@property.rhs", desc = "Select right part of an object property" },
|
||||
|
||||
["aa"] = { query = "@parameter.outer", desc = "Select outer part of a parameter/argument" },
|
||||
["ia"] = { query = "@parameter.inner", desc = "Select inner part of a parameter/argument" },
|
||||
|
||||
["ai"] = { query = "@conditional.outer", desc = "Select outer part of a conditional" },
|
||||
["ii"] = { query = "@conditional.inner", desc = "Select inner part of a conditional" },
|
||||
|
||||
["al"] = { query = "@loop.outer", desc = "Select outer part of a loop" },
|
||||
["il"] = { query = "@loop.inner", desc = "Select inner part of a loop" },
|
||||
|
||||
["af"] = { query = "@call.outer", desc = "Select outer part of a function call" },
|
||||
["if"] = { query = "@call.inner", desc = "Select inner part of a function call" },
|
||||
|
||||
["am"] = { query = "@function.outer", desc = "Select outer part of a method/function definition" },
|
||||
["im"] = { query = "@function.inner", desc = "Select inner part of a method/function definition" },
|
||||
|
||||
["ac"] = { query = "@class.outer", desc = "Select outer part of a class" },
|
||||
["ic"] = { query = "@class.inner", desc = "Select inner part of a class" },
|
||||
},
|
||||
},
|
||||
swap = {
|
||||
enable = true,
|
||||
swap_next = {
|
||||
["<leader>na"] = "@parameter.inner", -- swap parameters/argument with next
|
||||
["<leader>n:"] = "@property.outer", -- swap object property with next
|
||||
["<leader>nm"] = "@function.outer", -- swap function with next
|
||||
},
|
||||
swap_previous = {
|
||||
["<leader>pa"] = "@parameter.inner", -- swap parameters/argument with prev
|
||||
["<leader>p:"] = "@property.outer", -- swap object property with prev
|
||||
["<leader>pm"] = "@function.outer", -- swap function with previous
|
||||
},
|
||||
},
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true, -- whether to set jumps in the jumplist
|
||||
goto_next_start = {
|
||||
["]f"] = { query = "@call.outer", desc = "Next function call start" },
|
||||
["]m"] = { query = "@function.outer", desc = "Next method/function def start" },
|
||||
["]c"] = { query = "@class.outer", desc = "Next class start" },
|
||||
["]i"] = { query = "@conditional.outer", desc = "Next conditional start" },
|
||||
["]l"] = { query = "@loop.outer", desc = "Next loop start" },
|
||||
|
||||
-- You can pass a query group to use query from `queries/<lang>/<query_group>.scm file in your runtime path.
|
||||
-- Below example nvim-treesitter's `locals.scm` and `folds.scm`. They also provide highlights.scm and indent.scm.
|
||||
["]s"] = { query = "@scope", query_group = "locals", desc = "Next scope" },
|
||||
["]z"] = { query = "@fold", query_group = "folds", desc = "Next fold" },
|
||||
},
|
||||
goto_next_end = {
|
||||
["]F"] = { query = "@call.outer", desc = "Next function call end" },
|
||||
["]M"] = { query = "@function.outer", desc = "Next method/function def end" },
|
||||
["]C"] = { query = "@class.outer", desc = "Next class end" },
|
||||
["]I"] = { query = "@conditional.outer", desc = "Next conditional end" },
|
||||
["]L"] = { query = "@loop.outer", desc = "Next loop end" },
|
||||
},
|
||||
goto_previous_start = {
|
||||
["[f"] = { query = "@call.outer", desc = "Prev function call start" },
|
||||
["[m"] = { query = "@function.outer", desc = "Prev method/function def start" },
|
||||
["[c"] = { query = "@class.outer", desc = "Prev class start" },
|
||||
["[i"] = { query = "@conditional.outer", desc = "Prev conditional start" },
|
||||
["[l"] = { query = "@loop.outer", desc = "Prev loop start" },
|
||||
},
|
||||
goto_previous_end = {
|
||||
["[F"] = { query = "@call.outer", desc = "Prev function call end" },
|
||||
["[M"] = { query = "@function.outer", desc = "Prev method/function def end" },
|
||||
["[C"] = { query = "@class.outer", desc = "Prev class end" },
|
||||
["[I"] = { query = "@conditional.outer", desc = "Prev conditional end" },
|
||||
["[L"] = { query = "@loop.outer", desc = "Prev loop end" },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
local ts_repeat_move = require("nvim-treesitter.textobjects.repeatable_move")
|
||||
|
||||
-- vim way: ; goes to the direction you were moving.
|
||||
vim.keymap.set({ "n", "x", "o" }, ";", ts_repeat_move.repeat_last_move)
|
||||
vim.keymap.set({ "n", "x", "o" }, ",", ts_repeat_move.repeat_last_move_opposite)
|
||||
|
||||
-- Optionally, make builtin f, F, t, T also repeatable with ; and ,
|
||||
vim.keymap.set({ "n", "x", "o" }, "f", ts_repeat_move.builtin_f)
|
||||
vim.keymap.set({ "n", "x", "o" }, "F", ts_repeat_move.builtin_F)
|
||||
vim.keymap.set({ "n", "x", "o" }, "t", ts_repeat_move.builtin_t)
|
||||
vim.keymap.set({ "n", "x", "o" }, "T", ts_repeat_move.builtin_T)
|
||||
end,
|
||||
}
|
30
lua/pika/plugins/lsp/rainbow-delimiters.lua
Normal file
30
lua/pika/plugins/lsp/rainbow-delimiters.lua
Normal file
|
@ -0,0 +1,30 @@
|
|||
return {
|
||||
{
|
||||
"hiphish/rainbow-delimiters.nvim",
|
||||
config = function()
|
||||
local rainbow_delimiters = require 'rainbow-delimiters'
|
||||
|
||||
-- Setup configuration for rainbow-delimiters
|
||||
vim.g.rainbow_delimiters = {
|
||||
strategy = {
|
||||
[''] = rainbow_delimiters.strategy['global'],
|
||||
commonlisp = rainbow_delimiters.strategy['local'],
|
||||
},
|
||||
query = {
|
||||
[''] = 'rainbow-delimiters',
|
||||
latex = 'rainbow-blocks',
|
||||
},
|
||||
highlight = {
|
||||
'RainbowDelimiterRed',
|
||||
'RainbowDelimiterYellow',
|
||||
'RainbowDelimiterBlue',
|
||||
'RainbowDelimiterOrange',
|
||||
'RainbowDelimiterGreen',
|
||||
'RainbowDelimiterViolet',
|
||||
'RainbowDelimiterCyan',
|
||||
},
|
||||
blacklist = {'c', 'cpp'},
|
||||
}
|
||||
end
|
||||
}
|
||||
}
|
37
lua/pika/plugins/lsp/treesitter.lua
Normal file
37
lua/pika/plugins/lsp/treesitter.lua
Normal file
|
@ -0,0 +1,37 @@
|
|||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
build = ":TSUpdate",
|
||||
dependencies = {
|
||||
"windwp/nvim-ts-autotag",
|
||||
},
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
autotag = { enable = true },
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"gitignore",
|
||||
"git_config",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"yaml",
|
||||
"lua",
|
||||
"ini",
|
||||
"passwd",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<C-space>",
|
||||
node_incremental = "<C-space>",
|
||||
scope_incremental = false,
|
||||
node_decremental = "<bs>",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
9
lua/pika/plugins/markdown.lua
Normal file
9
lua/pika/plugins/markdown.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
return{
|
||||
{
|
||||
'MeanderingProgrammer/render-markdown.nvim',
|
||||
opts = {},
|
||||
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
|
||||
dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
|
||||
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
|
||||
},
|
||||
}
|
32
lua/pika/plugins/mini.lua
Normal file
32
lua/pika/plugins/mini.lua
Normal file
|
@ -0,0 +1,32 @@
|
|||
return {
|
||||
-- mini-ai for a and i selections or other --> vin" for visual in next ""
|
||||
{
|
||||
"echasnovski/mini.ai",
|
||||
version = "false",
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- ─< mini-surround for surrounding words or lines with "" or () or '' etc.. >──────────
|
||||
{
|
||||
"echasnovski/mini.surround",
|
||||
version = "false",
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- ─< miniIcons >───────────────────────────────────────────────────────────────────────
|
||||
{
|
||||
"echasnovski/mini.icons",
|
||||
version = "false",
|
||||
opts = {},
|
||||
lazy = true,
|
||||
specs = {
|
||||
{ "nvim-tree/nvim-web-devicons", enabled = false, optional = true },
|
||||
},
|
||||
init = function()
|
||||
package.preload["nvim-web-devicons"] = function()
|
||||
require("mini.icons").mock_nvim_web_devicons()
|
||||
return package.loaded["nvim-web-devicons"]
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
263
lua/pika/plugins/qol.lua
Normal file
263
lua/pika/plugins/qol.lua
Normal file
|
@ -0,0 +1,263 @@
|
|||
return {
|
||||
-- ╭───────────╮
|
||||
-- │ autopairs │
|
||||
-- ╰───────────╯
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = { "InsertEnter" },
|
||||
dependencies = {
|
||||
"hrsh7th/nvim-cmp",
|
||||
},
|
||||
config = function()
|
||||
-- import nvim-autopairs
|
||||
local autopairs = require("nvim-autopairs")
|
||||
|
||||
-- configure autopairs
|
||||
autopairs.setup({
|
||||
check_ts = true, -- enable treesitter
|
||||
ts_config = {
|
||||
lua = { "string" }, -- don't add pairs in lua string treesitter nodes
|
||||
javascript = { "template_string" }, -- don't add pairs in javascript template_string treesitter nodes
|
||||
java = false, -- don't check treesitter on java
|
||||
},
|
||||
})
|
||||
|
||||
-- import nvim-autopairs completion functionality
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
|
||||
-- import nvim-cmp plugin (completions plugin)
|
||||
local cmp = require("cmp")
|
||||
|
||||
-- make autopairs and completion work together
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||
end,
|
||||
},
|
||||
|
||||
-- ╭─────────────────────────────────────╮
|
||||
-- │ ╭───────────────╮ │
|
||||
-- │ │ comment boxes │<- yes, those ones │
|
||||
-- │ ╰───────────────╯ │
|
||||
-- ╰─────────────────────────────────────╯
|
||||
{
|
||||
"LudoPinelli/comment-box.nvim",
|
||||
lazy = false,
|
||||
opts = {
|
||||
comment_style = "line",
|
||||
doc_width = 90, -- width of the document
|
||||
box_width = 75, -- width of the boxes
|
||||
line_width = 120, -- width of the lines
|
||||
},
|
||||
-- ───────────────────────────────< keymaps - commentboxes >───────────────────────────────
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cd",
|
||||
"<Cmd>CBd<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]ommentbox [d]elete" }
|
||||
),
|
||||
vim.keymap.set(
|
||||
"v",
|
||||
"<leader>cd",
|
||||
"<Cmd>CBd<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]ommentbox [d]elete" }
|
||||
),
|
||||
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cy",
|
||||
"<Cmd>CBy<CR>",
|
||||
{ noremap = true, silent = true, desc = "[y]ank content of Commentbox" }
|
||||
),
|
||||
vim.keymap.set(
|
||||
"v",
|
||||
"<leader>cy",
|
||||
"<Cmd>CBy<CR>",
|
||||
{ noremap = true, silent = true, desc = "[y]ank content of Commentbox" }
|
||||
),
|
||||
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cb",
|
||||
"<Cmd>CBlabox1<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate comment [b]ox" }
|
||||
),
|
||||
vim.keymap.set(
|
||||
"v",
|
||||
"<leader>cb",
|
||||
"<Cmd>CBlabox1<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate comment [b]ox" }
|
||||
),
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cB",
|
||||
"<Cmd>CBcabox1<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate comment [b]ox (centered)" }
|
||||
),
|
||||
|
||||
vim.keymap.set(
|
||||
"v",
|
||||
"<leader>cB",
|
||||
"<Cmd>CBcabox1<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate comment [b]ox (centered)" }
|
||||
),
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cc",
|
||||
"<Cmd>CBllbox14<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate [c]omment" }
|
||||
),
|
||||
vim.keymap.set(
|
||||
"v",
|
||||
"<leader>cc",
|
||||
"<Cmd>CBllbox14<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate [c]omment" }
|
||||
),
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cC",
|
||||
"<Cmd>CBclbox14<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate [c]omment (C)entered" }
|
||||
),
|
||||
vim.keymap.set(
|
||||
"v",
|
||||
"<leader>cC",
|
||||
"<Cmd>CBclbox14<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate [c]omment (C)entered" }
|
||||
),
|
||||
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cl",
|
||||
"<Cmd>CBllline8<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate comment [l]ine" }
|
||||
),
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>cL",
|
||||
"<Cmd>CBlcline8<CR>",
|
||||
{ noremap = true, silent = true, desc = "[c]reate comment [L]ine" }
|
||||
),
|
||||
},
|
||||
|
||||
-- ╭───────────╮
|
||||
-- │ colorizer │
|
||||
-- ╰───────────╯
|
||||
{
|
||||
"brenoprata10/nvim-highlight-colors",
|
||||
opts = {
|
||||
---Render style
|
||||
---@usage 'background'|'foreground'|'virtual'
|
||||
render = "background",
|
||||
|
||||
---Set virtual symbol (requires render to be set to 'virtual')
|
||||
virtual_symbol = "■",
|
||||
|
||||
---Set virtual symbol suffix (defaults to '')
|
||||
virtual_symbol_prefix = "",
|
||||
|
||||
---Set virtual symbol suffix (defaults to ' ')
|
||||
virtual_symbol_suffix = " ",
|
||||
|
||||
---Set virtual symbol position()
|
||||
---@usage 'inline'|'eol'|'eow'
|
||||
---inline mimics VS Code style
|
||||
---eol stands for `end of column` - Recommended to set `virtual_symbol_suffix = ''` when used.
|
||||
---eow stands for `end of word` - Recommended to set `virtual_symbol_prefix = ' ' and virtual_symbol_suffix = ''` when used.
|
||||
virtual_symbol_position = "inline",
|
||||
|
||||
---Highlight hex colors, e.g. '#FFFFFF'
|
||||
enable_hex = true,
|
||||
|
||||
---Highlight short hex colors e.g. '#fff'
|
||||
enable_short_hex = true,
|
||||
|
||||
---Highlight rgb colors, e.g. 'rgb(0 0 0)'
|
||||
enable_rgb = true,
|
||||
|
||||
---Highlight hsl colors, e.g. 'hsl(150deg 30% 40%)'
|
||||
enable_hsl = true,
|
||||
|
||||
---Highlight CSS variables, e.g. 'var(--testing-color)'
|
||||
enable_var_usage = true,
|
||||
|
||||
---Highlight named colors, e.g. 'green'
|
||||
enable_named_colors = true,
|
||||
|
||||
---Highlight tailwind colors, e.g. 'bg-blue-500'
|
||||
enable_tailwind = false,
|
||||
|
||||
---Set custom colors
|
||||
---Label must be properly escaped with '%' to adhere to `string.gmatch`
|
||||
--- :help string.gmatch
|
||||
custom_colors = {
|
||||
{ label = "%-%-theme%-primary%-color", color = "#0f1219" },
|
||||
{ label = "%-%-theme%-secondary%-color", color = "#5a5d64" },
|
||||
},
|
||||
|
||||
-- Exclude filetypes or buftypes from highlighting e.g. 'exclude_buftypes = {'text'}'
|
||||
exclude_filetypes = {},
|
||||
exclude_buftypes = {},
|
||||
},
|
||||
},
|
||||
|
||||
-- ╭──────────────────────────────────────╮
|
||||
-- │ flash - to navigate more efficiently │
|
||||
-- ╰──────────────────────────────────────╯
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
event = "VeryLazy",
|
||||
vscode = true,
|
||||
-- @type Flash.Config
|
||||
opts = {},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "S", mode = { "n", "o", "x" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||
},
|
||||
},
|
||||
|
||||
-- ╭──────────────────────────────╮
|
||||
-- │ renaming (also project wide) │
|
||||
-- ╰──────────────────────────────╯
|
||||
{
|
||||
"MagicDuck/grug-far.nvim",
|
||||
opts = { headerMaxWidth = 80 },
|
||||
cmd = "GrugFar",
|
||||
-- ────────────────────────────────────< keybindings >─────────────────────────────────
|
||||
keys = {
|
||||
{
|
||||
"<leader>sr",
|
||||
function()
|
||||
local grug = require("grug-far")
|
||||
local ext = vim.bo.buftype == "" and vim.fn.expand("%:e")
|
||||
grug.grug_far({
|
||||
transient = true,
|
||||
prefills = {
|
||||
filesFilter = ext and ext ~= "" and "*." .. ext or nil,
|
||||
},
|
||||
})
|
||||
end,
|
||||
mode = { "n", "v" },
|
||||
desc = "Search and Replace",
|
||||
},
|
||||
},
|
||||
},
|
||||
-- ╭──────────╮
|
||||
-- │ snippets │
|
||||
-- ╰──────────╯
|
||||
{
|
||||
{
|
||||
"chrisgrieser/nvim-scissors",
|
||||
lazy = false,
|
||||
dependencies = { "nvim-telescope/telescope.nvim", "garymjr/nvim-snippets" },
|
||||
opts = {
|
||||
snippetDir = "~/.config/nvim/snippets", -- <- i have this as a submodule in my neovim config to have a seperate repo https://git.k4li.de/dotfiles/nvim-snippets.git
|
||||
},
|
||||
},
|
||||
-- ──────────────────────────< keybindings for snippets engine >───────────────────────
|
||||
vim.keymap.set("n", "<leader>sm", "<CMD>:ScissorsEditSnippet<cr>"),
|
||||
vim.keymap.set("v", "<leader>sa", "<CMD>:ScissorsAddNewSnippet<cr>"),
|
||||
},
|
||||
}
|
62
lua/pika/plugins/telescope.lua
Normal file
62
lua/pika/plugins/telescope.lua
Normal file
|
@ -0,0 +1,62 @@
|
|||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
branch = "0.1.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||||
"echasnovski/mini.icons",
|
||||
},
|
||||
config = function()
|
||||
local telescope = require("telescope")
|
||||
local actions = require("telescope.actions")
|
||||
-- local transform_mod = require("telescope.actions.mt").transform_mod
|
||||
|
||||
telescope.setup({
|
||||
defaults = {
|
||||
path_display = { "smart" },
|
||||
mappings = {
|
||||
i = {
|
||||
["<C-k>"] = actions.move_selection_previous, -- move to prev result
|
||||
["<C-j>"] = actions.move_selection_next, -- move to next result
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
telescope.load_extension("fzf")
|
||||
|
||||
-- set keymaps
|
||||
local map = vim.keymap.set -- for conciseness
|
||||
|
||||
-- Telescope mappings
|
||||
map("n", "<leader>sf", "<cmd>Telescope find_files<CR>", { noremap = true, silent = true, desc = "Find Files" })
|
||||
map("n", "<leader>sw", "<cmd>Telescope live_grep<CR>", { noremap = true, silent = true, desc = "Search Word" })
|
||||
map("n", "<leader><leader>", "<cmd>Telescope buffers<CR>", { noremap = true, silent = true, desc = "Buffers" })
|
||||
local builtin = require("telescope.builtin")
|
||||
|
||||
map("n", "<leader>sn", function()
|
||||
builtin.find_files({ cwd = vim.fn.stdpath("config") })
|
||||
end, { desc = "[S]earch [N]eovim files" })
|
||||
map("n", "<leader>ff", builtin.find_files, { desc = "[S]earch [F]iles" })
|
||||
map("n", "<leader>sh", builtin.help_tags, { desc = "[S]earch [H]elp" })
|
||||
map("n", "<leader>sk", builtin.keymaps, { desc = "[S]earch [K]eymaps" })
|
||||
map("n", "<leader>sg", builtin.live_grep, { desc = "[S]earch by [G]rep" })
|
||||
map("n", "<leader>sd", builtin.diagnostics, { desc = "[S]earch [D]iagnostics" })
|
||||
-- map("n", "<leader>sr", builtin.resume, { desc = "[S]earch [R]esume" })
|
||||
map("n", "<leader>s.", builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
||||
map("n", "<leader><leader>", builtin.buffers, { desc = "[ ] Find existing buffers" })
|
||||
map("n", "<leader>sR", function()
|
||||
require("telescope.builtin").oldfiles()
|
||||
end)
|
||||
map("n", "<leader>T", "<cmd>Telescope colorscheme<CR>")
|
||||
map("n", "<leader>q", vim.cmd.q)
|
||||
|
||||
-- Additional custom mappings
|
||||
map("n", "<leader>/", function()
|
||||
builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown())
|
||||
end, { desc = "[/] Fuzzily search in current buffer" })
|
||||
map("n", "<leader>s/", function()
|
||||
builtin.live_grep({ grep_open_files = true, prompt_title = "Live Grep in Open Files" })
|
||||
end, { desc = "[S]earch [/] in Open Files" })
|
||||
end,
|
||||
}
|
304
lua/pika/plugins/ui.lua
Normal file
304
lua/pika/plugins/ui.lua
Normal file
|
@ -0,0 +1,304 @@
|
|||
return {
|
||||
-- ╭───────────────────────────────────────╮
|
||||
-- │ bufferline - for mistakes and stuff.. │
|
||||
-- ╰───────────────────────────────────────╯
|
||||
-- {
|
||||
-- "akinsho/bufferline.nvim",
|
||||
-- dependencies = { "echasnovski/mini.icons" },
|
||||
-- version = "*",
|
||||
-- opts = {
|
||||
-- options = {
|
||||
-- diagnostics = "nvim_lsp",
|
||||
-- diagnostics_update_on_event = true, -- use nvim's diagnostic handler
|
||||
-- diagnostics_indicator = function(count, level)
|
||||
-- local icon = level:match("error") and " " or " "
|
||||
-- return " " .. icon .. count
|
||||
-- end,
|
||||
-- offsets = { { filetype = "neo-tree", text = "File Explorer", highlight = "Directory" } },
|
||||
-- -- ─< style >───────────────────────────────────────────────────────────────────────────
|
||||
-- indicator = {
|
||||
-- icon = "▎", -- this should be omitted if indicator style is not 'icon'
|
||||
-- style = "icon",
|
||||
-- },
|
||||
-- move_wraps_at_ends = true, -- whether or not the move command "wraps" at the first or last position
|
||||
-- separator_style = "slope",
|
||||
-- -- ─< icons >───────────────────────────────────────────────────────────────────────────
|
||||
-- modified_icon = "",
|
||||
-- left_trunc_marker = "",
|
||||
-- right_trunc_marker = "",
|
||||
-- themable = true, -- allows highlight groups to be overriden i.e. sets highlights as default
|
||||
-- close_icon = "",
|
||||
-- buffer_close_icon = "",
|
||||
-- show_buffer_icons = true, -- disable filetype icons for buffers
|
||||
-- show_buffer_close_icons = true,
|
||||
-- show_close_icon = true,
|
||||
-- show_tab_indicators = true,
|
||||
-- hover = {
|
||||
-- enabled = true,
|
||||
-- delay = 80,
|
||||
-- reveal = { "close" },
|
||||
-- hide = { "nvim_lsp" },
|
||||
-- },
|
||||
-- -- You can set buffer_mode to "list" or "tabbed" based on your preference.
|
||||
-- buffer_mode = "list",
|
||||
-- color_icons = true, -- whether or not to add the filetype icon highlights
|
||||
-- },
|
||||
-- },
|
||||
-- config = function(_, opts)
|
||||
-- require("bufferline").setup(opts)
|
||||
-- -- Remap the tab key for buffer navigation (you can adjust the keys as needed)
|
||||
-- vim.keymap.set("n", "<Tab>", "<cmd>BufferLineCycleNext<CR>")
|
||||
-- vim.keymap.set("n", "<S-Tab>", "<cmd>BufferLineCyclePrev<CR>")
|
||||
-- end,
|
||||
-- },
|
||||
|
||||
-- ╭───────────────────────────────────╮
|
||||
-- │ cmdline - for nice command inputs │
|
||||
-- ╰───────────────────────────────────╯
|
||||
{
|
||||
"VonHeikemen/fine-cmdline.nvim",
|
||||
dependencies = {
|
||||
{ "MunifTanjim/nui.nvim" },
|
||||
},
|
||||
config = function()
|
||||
require("fine-cmdline").setup({
|
||||
cmdline = {
|
||||
enable_keymaps = true,
|
||||
smart_history = true,
|
||||
prompt = " ",
|
||||
},
|
||||
popup = {
|
||||
position = {
|
||||
row = "10%",
|
||||
col = "50%",
|
||||
},
|
||||
size = {
|
||||
width = "60%",
|
||||
},
|
||||
border = {
|
||||
style = "rounded",
|
||||
},
|
||||
win_options = {
|
||||
winhighlight = "Normal:Normal,FloatBorder:FloatBorder",
|
||||
},
|
||||
},
|
||||
-- hooks = {
|
||||
-- before_mount = function(input)
|
||||
-- -- code
|
||||
-- end,
|
||||
-- after_mount = function(input)
|
||||
-- -- code
|
||||
-- end,
|
||||
-- set_keymaps = function(imap, feedkeys)
|
||||
-- -- code
|
||||
-- end,
|
||||
-- },
|
||||
})
|
||||
end,
|
||||
vim.api.nvim_set_keymap("n", ":", "<cmd>FineCmdline<CR>", { noremap = true }),
|
||||
vim.keymap.set("n", "T", "<cmd>FineCmdline<CR>"),
|
||||
},
|
||||
|
||||
-- ╭───────────────────────────────────────╮
|
||||
-- │ barbecue - for a nice breadcrump menu │
|
||||
-- ╰───────────────────────────────────────╯
|
||||
-- {
|
||||
-- "utilyre/barbecue.nvim",
|
||||
-- name = "barbecue",
|
||||
-- version = "*",
|
||||
-- dependencies = {
|
||||
-- "SmiteshP/nvim-navic",
|
||||
-- "echasnovski/mini.icons", -- optional dependency
|
||||
-- },
|
||||
-- opts = {
|
||||
-- theme = {
|
||||
-- -- this highlight is used to override other highlights
|
||||
-- -- you can take advantage of its `bg` and set a background throughout your winbar
|
||||
-- -- (e.g. basename will look like this: { fg = "#c0caf5", bold = true })
|
||||
-- normal = { fg = "#c0caf5" },
|
||||
--
|
||||
-- -- these highlights correspond to symbols table from config
|
||||
-- ellipsis = { fg = "#737aa2" },
|
||||
-- separator = { fg = "#737aa2" },
|
||||
-- modified = { fg = "#737aa2" },
|
||||
--
|
||||
-- -- these highlights represent the _text_ of three main parts of barbecue
|
||||
-- dirname = { fg = "#737aa2" },
|
||||
-- basename = { bold = true },
|
||||
-- context = {},
|
||||
--
|
||||
-- -- these highlights are used for context/navic icons
|
||||
-- context_file = { fg = "#ac8fe4" },
|
||||
-- context_module = { fg = "#ac8fe4" },
|
||||
-- context_namespace = { fg = "#ac8fe4" },
|
||||
-- context_package = { fg = "#ac8fe4" },
|
||||
-- context_class = { fg = "#ac8fe4" },
|
||||
-- context_method = { fg = "#ac8fe4" },
|
||||
-- context_property = { fg = "#ac8fe4" },
|
||||
-- context_field = { fg = "#ac8fe4" },
|
||||
-- context_constructor = { fg = "#ac8fe4" },
|
||||
-- context_enum = { fg = "#ac8fe4" },
|
||||
-- context_interface = { fg = "#ac8fe4" },
|
||||
-- context_function = { fg = "#ac8fe4" },
|
||||
-- context_variable = { fg = "#ac8fe4" },
|
||||
-- context_constant = { fg = "#ac8fe4" },
|
||||
-- context_string = { fg = "#ac8fe4" },
|
||||
-- context_number = { fg = "#ac8fe4" },
|
||||
-- context_boolean = { fg = "#ac8fe4" },
|
||||
-- context_array = { fg = "#ac8fe4" },
|
||||
-- context_object = { fg = "#ac8fe4" },
|
||||
-- context_key = { fg = "#ac8fe4" },
|
||||
-- context_null = { fg = "#ac8fe4" },
|
||||
-- context_enum_member = { fg = "#ac8fe4" },
|
||||
-- context_struct = { fg = "#ac8fe4" },
|
||||
-- context_event = { fg = "#ac8fe4" },
|
||||
-- context_operator = { fg = "#ac8fe4" },
|
||||
-- context_type_parameter = { fg = "#ac8fe4" },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- ╭─────────────────────────────────╮
|
||||
-- │ indentlines - nice indent lines │
|
||||
-- ╰─────────────────────────────────╯
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
main = "ibl",
|
||||
opts = {
|
||||
indent = {
|
||||
char = "┊",
|
||||
tab_char = "┊",
|
||||
-- char = "│",
|
||||
-- tab_char = "│",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- ╭──────────────────╮
|
||||
-- │ markdown plugins │
|
||||
-- ╰──────────────────╯
|
||||
{
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
opts = {},
|
||||
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter", "echasnovski/mini.icons" }, -- if you use standalone mini plugins
|
||||
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
|
||||
},
|
||||
|
||||
-- ╭────────────────────────────────────╮
|
||||
-- │ notify for excellent notifications │
|
||||
-- ╰────────────────────────────────────╯
|
||||
-- {
|
||||
-- "rcarriga/nvim-notify",
|
||||
-- config = function()
|
||||
-- require("notify").setup({
|
||||
-- stages = "slide",
|
||||
-- background_colour = "FloatShadow",
|
||||
-- max_width = 120,
|
||||
-- timeout = 2750,
|
||||
-- render = "wrapped-compact",
|
||||
-- -- Minimum/Maximum width for notification windows
|
||||
-- minimum_width = 30,
|
||||
-- maximum_width = 120,
|
||||
--
|
||||
-- -- Function called when a new window is opened, use for changing win settings/config
|
||||
-- on_open = nil,
|
||||
--
|
||||
-- -- Function called when a window is closed
|
||||
-- on_close = nil,
|
||||
-- icons = {
|
||||
-- ERROR = "", -- alternate symbol
|
||||
-- WARN = "",
|
||||
-- INFO = "",
|
||||
-- DEBUG = "",
|
||||
-- TRACE = "",
|
||||
-- },
|
||||
-- })
|
||||
-- vim.notify = require("notify")
|
||||
-- end,
|
||||
-- },
|
||||
-- ╭──────────────────────────────╮
|
||||
-- │ slimline - nice bar for nvim │
|
||||
-- ╰──────────────────────────────╯
|
||||
{
|
||||
-- Calls `require('slimline').setup({})`
|
||||
"sschleemilch/slimline.nvim",
|
||||
opts = {
|
||||
bold = true, -- makes primary parts and mode bold
|
||||
verbose_mode = false, -- Mode as single letter or as a word
|
||||
style = "bg", -- or "fg". Whether highlights should be applied to bg or fg of components
|
||||
mode_follow_style = true, -- Whether the mode color components should follow the style option
|
||||
components = { -- Choose components and their location
|
||||
left = {
|
||||
"mode",
|
||||
-- "path",
|
||||
-- "git",
|
||||
},
|
||||
center = {
|
||||
"path",
|
||||
"git",
|
||||
},
|
||||
right = {
|
||||
"diagnostics",
|
||||
"filetype_lsp",
|
||||
"progress",
|
||||
},
|
||||
},
|
||||
spaces = {
|
||||
components = " ", -- string between components
|
||||
left = " ", -- string at the start of the line
|
||||
right = " ", -- string at the end of the line
|
||||
},
|
||||
sep = {
|
||||
hide = {
|
||||
first = false, -- hides the first separator
|
||||
last = false, -- hides the last separator
|
||||
},
|
||||
left = "", -- left separator of components
|
||||
right = "", -- right separator of components
|
||||
},
|
||||
hl = {
|
||||
modes = {
|
||||
normal = "Type", -- highlight base of modes
|
||||
insert = "Function",
|
||||
pending = "Boolean",
|
||||
visual = "Keyword",
|
||||
command = "String",
|
||||
},
|
||||
base = "Comment", -- highlight of everything in in between components
|
||||
primary = "Normal", -- highlight of primary parts (e.g. filename)
|
||||
secondary = "Comment", -- highlight of secondary parts (e.g. filepath)
|
||||
},
|
||||
icons = {
|
||||
diagnostics = {
|
||||
ERROR = " ",
|
||||
WARN = " ",
|
||||
HINT = " ",
|
||||
INFO = " ",
|
||||
},
|
||||
git = {
|
||||
branch = "",
|
||||
},
|
||||
folder = " ",
|
||||
lines = " ",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- ╭────────────────────────────────────────╮
|
||||
-- │ which key - to know what to press next │
|
||||
-- ╰────────────────────────────────────────╯
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
init = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 350
|
||||
end,
|
||||
opts = {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue