Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d803c6ad53 | ||
![]() |
600a7163fa | ||
![]() |
8c9e742235 |
32 changed files with 569 additions and 2278 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -15,4 +15,3 @@
|
|||
|
||||
lazy-lock.json
|
||||
cd-project.nvim.json
|
||||
# custom/
|
||||
|
|
43
README.md
43
README.md
|
@ -1,4 +1,5 @@
|
|||
This is my current neovim configuration. It uses [lazy.nvim](https://github.com/folke/lazy.nvim) as the packagemanager.
|
||||
This is my current neovim configuration. It uses [lazy.nvim](https://github.com/folke/lazy.nvim) as the packagemanager. </br>
|
||||
My config is relatively simple structured. If you want to add a plugin, just create a <plugin.name>.lua file in the lua/pika/plugin/ path, inside a require{} table.
|
||||
|
||||
> [!TIP]
|
||||
> pika is my username, so feel free to change this to your needs.
|
||||
|
@ -6,52 +7,26 @@ This is my current neovim configuration. It uses [lazy.nvim](https://github.com/
|
|||
## installation
|
||||
|
||||
> [!CAUTION]
|
||||
> You're neovim version has to be >=0.10.0 </br>
|
||||
> You're neovim version has to be >=0.9.0 </br>
|
||||
> If you're not sure what version you have, type `nvim --version` </br>
|
||||
> To build neovim from source, you can run the following. </br>
|
||||
> This script should cover [most linux distros](https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh "This script is used to detect the linux distros for installing the dependencies and building from source")
|
||||
> To install neovim 0.9.0 or higher, you can run the following.
|
||||
>
|
||||
> ```bash
|
||||
> curl -fsSL https://git.k4li.de/scripts/installs/raw/branch/main/neovim.sh | bash
|
||||
> ```
|
||||
|
||||
> [!TIP]
|
||||
> You can run the script silently, via..
|
||||
>
|
||||
> ```bash
|
||||
> curl -fsSL https://... | bash -s -- [ --silent | -s ]
|
||||
> bash -c "$(curl -sSL https://git.k4li.de/pika/scripts/raw/branch/main/bash/installs/neovim.sh)"
|
||||
> ```
|
||||
|
||||
---
|
||||
|
||||
For config-installation, just git clone this repo to your $HOME/.config/ folder.
|
||||
For installation, just git clone this repo to your $HOME/.config/ folder.
|
||||
|
||||
```bash
|
||||
git clone --recursive --depth=1 https://git.k4li.de/dotfiles/nvim.git $HOME/.config/nvim/
|
||||
git clone --depth=1 https://git.k4li.de/dotfiles/nvim.git $HOME/.config/nvim/
|
||||
```
|
||||
|
||||
> The `--recursive` flag is for pulling down the snippets submodule, since this is used in more neovim configs </br>
|
||||
> Prefetch the config with `nvim --headless +q` and enjoy the config
|
||||
|
||||
---
|
||||
|
||||
## configuration
|
||||
|
||||
- Colorscheme-plugins are defined in [colorschemes.lua](lua/pika/plugins/colorschemes.lua)
|
||||
Colorscheme-plugins are defined in [colorschemes.lua](lua/pika/plugins/colorschemes.lua)
|
||||
|
||||
> [!TIP]
|
||||
> default theme is `duskfox` </br>
|
||||
> default theme is `monet` </br>
|
||||
> you can change the theme in the colorscheme function in the [init.lua](./init.lua)
|
||||
|
||||
---
|
||||
|
||||
- Plugin configuration and adding your own
|
||||
|
||||
My config is relatively simple structured. If you want to add a plugin, just create a `<plugin.name>.lua` file in the `lua/pika/plugin/` path which has the plugin code inside a `require{}` table.
|
||||
|
||||
```plugin.lua
|
||||
require{
|
||||
"<username>/<plugin>", -- <- usually the git username/repo, can also be a full link to external git repo
|
||||
opts = {}, -- <- put in your plugin configuration content. The opts = {}, calls `require("<plugin>").setup({})`
|
||||
}
|
||||
```
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
get_ip() {
|
||||
ip a | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d/ -f1 | head -n 1
|
||||
}
|
||||
|
||||
random() {
|
||||
openssl rand -hex "${1:-32}"
|
||||
}
|
19
init.lua
19
init.lua
|
@ -1,14 +1,9 @@
|
|||
if vim.g.vscode then
|
||||
require("pika.core")
|
||||
else
|
||||
require("pika.core")
|
||||
require("pika.lazy")
|
||||
require("pika.core")
|
||||
require("pika.lazy")
|
||||
|
||||
-- ─< Call the function to set the desired colorscheme >────────────────────────────────
|
||||
-- ╭──────────────────────────────────────────────────────╮
|
||||
-- │ themes are under ./lua/pika/plugins/colorschemes.lua │
|
||||
-- ╰──────────────────────────────────────────────────────╯
|
||||
-- ─< Call the function to set the desired colorscheme >────────────────────────────────
|
||||
-- ╭──────────────────────────────────────────────────────╮
|
||||
-- │ themes are under ./lua/pika/plugins/colorschemes.lua │
|
||||
-- ╰──────────────────────────────────────────────────────╯
|
||||
|
||||
-- vim.cmd.colorscheme("tokyodark")
|
||||
vim.cmd.colorscheme("rose-pine")
|
||||
end
|
||||
vim.cmd.colorscheme("oldschool")
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
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
|
||||
|
||||
-- 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 })
|
|
@ -1,13 +0,0 @@
|
|||
vim.api.nvim_create_autocmd("TermOpen", {
|
||||
group = vim.api.nvim_create_augroup("custom-term-open", { clear = true }),
|
||||
callback = function()
|
||||
vim.opt.number = false
|
||||
vim.opt.relativenumber = false
|
||||
end,
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>ts", function()
|
||||
vim.cmd.new()
|
||||
vim.cmd.term()
|
||||
vim.api.nvim_win_set_height(0, 15)
|
||||
end)
|
|
@ -1,52 +0,0 @@
|
|||
-- ─< Set path to your shell functions file (update this to your actual path) >─────────
|
||||
local shell_script_path = vim.fs.joinpath(vim.fn.stdpath("config") .. "/functions.sh")
|
||||
|
||||
-- ─< Add this before the keymap definition to check for file existence >───────────────
|
||||
if vim.uv.fs_stat(shell_script_path) then -- Check if file exists
|
||||
-- inserts shell commands (sources ~/.config/nvim/functions.sh to source predefined functions)
|
||||
vim.keymap.set({ "n", "i" }, "<leader>tt", function()
|
||||
vim.ui.input({ prompt = "Shell Command: " }, function(input_cmd)
|
||||
if not input_cmd or input_cmd == "" then
|
||||
return
|
||||
end
|
||||
|
||||
-- Construct the command to source your functions and execute
|
||||
local full_cmd = string.format(
|
||||
"source %s && %s", -- Uses POSIX-compliant '&&' to fail if source fails
|
||||
vim.fn.shellescape(shell_script_path),
|
||||
input_cmd
|
||||
)
|
||||
|
||||
-- Execute in bash to ensure function availability
|
||||
local result = vim.fn.system({ "bash", "--norc", "--noprofile", "-c", full_cmd })
|
||||
local exit_code = vim.v.shell_error
|
||||
|
||||
-- Handle errors
|
||||
if exit_code ~= 0 then
|
||||
vim.notify(
|
||||
"Error (" .. exit_code .. "):\n" .. result,
|
||||
vim.log.levels.ERROR,
|
||||
{ title = "Command Failed" }
|
||||
)
|
||||
return
|
||||
end
|
||||
|
||||
-- Process output
|
||||
local lines = vim.split(result:gsub("\n$", ""), "\n")
|
||||
|
||||
-- Insert at cursor position
|
||||
local row, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
if #lines == 1 then
|
||||
vim.api.nvim_set_current_line(
|
||||
vim.api.nvim_get_current_line():sub(1, col)
|
||||
.. lines[1]
|
||||
.. vim.api.nvim_get_current_line():sub(col + 1)
|
||||
)
|
||||
else
|
||||
vim.api.nvim_buf_set_lines(0, row, row, false, lines)
|
||||
end
|
||||
end)
|
||||
end, { desc = "Insert Shell Output (with functions)" })
|
||||
else
|
||||
vim.notify("Shell functions file not found: " .. shell_script_path, vim.log.levels.WARN)
|
||||
end
|
|
@ -1,5 +1,2 @@
|
|||
require("pika.core.options")
|
||||
require("pika.core.keymaps")
|
||||
require("pika.core.custom")
|
||||
require("pika.core.custom.terminalcmd")
|
||||
require("pika.core.custom.hugopaste")
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
-- INFO: Maps leader to 'space'
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- TIP: Unmap keymaps
|
||||
-- ─< lua/keymaps.lua >─────────────────────────────────────────────────────────────────
|
||||
local nomap = vim.keymap.set
|
||||
nomap("i", "<C-k>", "")
|
||||
|
@ -9,19 +7,18 @@ nomap("n", "<C-k>", "")
|
|||
nomap("n", "q", "")
|
||||
nomap("v", "q", "")
|
||||
nomap("v", "<leader>S", "")
|
||||
-- nomap("n", "<C-A-Tab", "")
|
||||
-- nomap("n", "<C-A-S-Tab", "")
|
||||
|
||||
-- INFO: vim.keymap.set with map()
|
||||
local map = vim.keymap.set
|
||||
|
||||
map("n", "<Esc>", "<cmd>nohlsearch<CR>")
|
||||
|
||||
-- ─< Comment >─────────────────────────────────────────────────────────────────────────
|
||||
-- INFO: makes instant comments, no plugin needet
|
||||
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" })
|
||||
|
@ -31,9 +28,10 @@ map("i", "<C-j>", "<Down>", { desc = "move down" })
|
|||
map("i", "<C-k>", "<Up>", { desc = "move up" })
|
||||
|
||||
map("n", ";", ":", { desc = "CMD enter command mode" })
|
||||
|
||||
-- CTRL-C for escape
|
||||
map({ "i", "n", "v" }, "<C-c>", "<ESC>")
|
||||
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>")
|
||||
|
||||
|
@ -50,32 +48,12 @@ 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>Q", "<cmd>q!<CR>")
|
||||
map("n", "<leader>s", vim.cmd.w)
|
||||
map("n", "<C-s>", vim.cmd.w)
|
||||
|
||||
-- Visual mode: Indent selected lines
|
||||
-- INFO: got removed because of the mini-move plugin
|
||||
-- map("v", "<Tab>", ">gv", { desc = "Indent and keep selection" })
|
||||
-- map("v", "<S-Tab>", "<gv", { desc = "Unindent and keep selection" })
|
||||
-- ─< 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
|
||||
|
||||
-- ─< Terminal >────────────────────────────────────────────────────────────────────────
|
||||
-- NOTE: This is only for terminal mode
|
||||
map("t", "<C-x>", "<C-\\><C-N>", { desc = "terminal escape terminal mode" })
|
||||
|
||||
-- ──────────────────────────────< rename word under cursor >──────────────────────────────
|
||||
map("n", "<leader>R", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
|
||||
map("v", "<leader>R", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
|
||||
-- ───────────────< Enhanced word under cursor renaming in current buffer >────────────
|
||||
-- map({ "n", "x" }, "<leader>R", function()
|
||||
-- local text = vim.fn.mode() == "n" and vim.fn.expand("<cword>") or vim.fn.trim(vim.fn.getreg('"'))
|
||||
-- vim.ui.input({ prompt = "Replace: ", default = text }, function(input)
|
||||
-- if input and input ~= text then
|
||||
-- vim.cmd(("keeppatterns %%s/%s/%s/g"):format(vim.pesc(text), vim.pesc(input)))
|
||||
-- end
|
||||
-- end)
|
||||
-- end, { desc = "Rename in buffer" })
|
||||
|
|
|
@ -8,14 +8,6 @@ o.number = true
|
|||
-- Minimal number of screen lines to keep above and below the cursor.
|
||||
o.scrolloff = 8
|
||||
|
||||
o.formatoptions:append("c") -- Auto-wrap comments
|
||||
o.formatoptions:append("r") -- Auto-insert comment leader on Enter
|
||||
o.formatoptions:append("o") -- Auto-insert comment leader with 'o'/'O'
|
||||
o.formatoptions:append("q") -- Allow formatting of comments with 'gq'
|
||||
o.formatoptions:remove("t") -- Don't auto-wrap text (only comments)
|
||||
|
||||
o.textwidth = 80
|
||||
|
||||
-- tabs & indentation
|
||||
o.tabstop = 2 -- 2 spaces for tabs (prettier default)
|
||||
o.shiftwidth = 2 -- 2 spaces for indent width
|
||||
|
@ -61,11 +53,7 @@ o.laststatus = 3
|
|||
o.swapfile = false
|
||||
|
||||
-- Disable the tilde on empty lines
|
||||
-- enable slimline bubble chain ( )----( )
|
||||
o.fillchars = {
|
||||
eob = " ",
|
||||
-- stl = "─",
|
||||
}
|
||||
o.fillchars = { eob = " " }
|
||||
|
||||
-- SudaRead automatic if file is inaccessible
|
||||
vim.g.suda_smart_edit = 1
|
||||
|
@ -89,7 +77,7 @@ vim.cmd([[
|
|||
|
||||
if vim.g.neovide then
|
||||
-- vim.g.neovide_transparency = 0.35
|
||||
vim.g.neovide_opacity = 1
|
||||
vim.g.neovide_transparency = 1
|
||||
vim.g.neovide_theme = "dark"
|
||||
vim.g.neovide_refresh_rate = 90
|
||||
vim.g.neovide_cursor_vfx_mode = "torpedo"
|
||||
|
|
|
@ -29,7 +29,8 @@ require("lazy").setup({
|
|||
{ import = "pika.plugins.lsp" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
ui = { backdrop = 100 },
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "nord" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
if true then
|
||||
return {}
|
||||
end
|
||||
-- WARNING: If this line is true, then the plugin will NOT get sourced!
|
||||
return {
|
||||
{
|
||||
"yetone/avante.nvim",
|
||||
event = "VeryLazy",
|
||||
version = false, -- Set this to "*" to always pull the latest release version, or set it to false to update to the latest code changes.
|
||||
opts = {
|
||||
-- add any opts here
|
||||
-- for example
|
||||
provider = "openai",
|
||||
openai = {
|
||||
endpoint = "https://api.openai.com/v1",
|
||||
model = "gpt-4o", -- your desired model (or use gpt-4o, etc.)
|
||||
timeout = 30000, -- timeout in milliseconds
|
||||
temperature = 0, -- adjust if needed
|
||||
max_tokens = 4096,
|
||||
-- reasoning_effort = "high" -- only supported for reasoning models (o1, etc.)
|
||||
},
|
||||
},
|
||||
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
|
||||
build = "make",
|
||||
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"stevearc/dressing.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
--- The below dependencies are optional,
|
||||
"echasnovski/mini.pick", -- for file_selector provider mini.pick
|
||||
"nvim-telescope/telescope.nvim", -- for file_selector provider telescope
|
||||
"hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
|
||||
"ibhagwan/fzf-lua", -- for file_selector provider fzf
|
||||
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
|
||||
"zbirenbaum/copilot.lua", -- for providers='copilot'
|
||||
{
|
||||
-- support for image pasting
|
||||
"HakonHarnes/img-clip.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
-- recommended settings
|
||||
default = {
|
||||
embed_image_as_base64 = false,
|
||||
prompt_for_file_name = false,
|
||||
drag_and_drop = {
|
||||
insert_mode = true,
|
||||
},
|
||||
-- required for Windows users
|
||||
use_absolute_path = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
-- Make sure to set this up properly if you have lazy=true
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
opts = {
|
||||
file_types = { "markdown", "Avante" },
|
||||
},
|
||||
ft = { "markdown", "Avante" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,194 +1,36 @@
|
|||
return {
|
||||
{ "SethBarberee/challenger-deep.nvim" },
|
||||
-- ╭───────────────╮
|
||||
-- │ common themes │
|
||||
-- ╰───────────────╯
|
||||
-- ╭──────────────────╮
|
||||
-- │ tokyonight/-dark │
|
||||
-- ╰──────────────────╯
|
||||
-- { "folke/tokyonight.nvim" },
|
||||
{
|
||||
"tiagovla/tokyodark.nvim",
|
||||
opts = {
|
||||
terminal_colors = true, -- enable terminal colors
|
||||
transparent_background = false, -- set background to transparent
|
||||
gamma = 0.90, -- adjust the brightness of the theme
|
||||
styles = {
|
||||
comments = { italic = false }, -- style for comments
|
||||
keywords = { italic = true }, -- style for keywords
|
||||
identifiers = { italic = true }, -- style for identifiers
|
||||
variables = { bold = true, underline = false }, -- style for variables
|
||||
functions = {}, -- style for functions
|
||||
},
|
||||
custom_highlights = {} or function(highlights, palette)
|
||||
return {}
|
||||
end, -- extend highlights
|
||||
custom_palette = {} or function(palette)
|
||||
return {}
|
||||
end, -- extend palette
|
||||
},
|
||||
},
|
||||
|
||||
-- ╭────────────╮
|
||||
-- │ catppuccin │
|
||||
-- ╰────────────╯
|
||||
-- { "catppuccin/nvim", name = "catppuccin" },
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
opts = {
|
||||
term_colors = true,
|
||||
transparent_background = false,
|
||||
styles = {
|
||||
comments = {},
|
||||
conditionals = {},
|
||||
loops = {},
|
||||
functions = {},
|
||||
keywords = {},
|
||||
strings = {},
|
||||
variables = {},
|
||||
numbers = {},
|
||||
booleans = {},
|
||||
properties = {},
|
||||
types = {},
|
||||
},
|
||||
-- color_overrides = {
|
||||
-- mocha = {
|
||||
-- base = "#101010",
|
||||
-- mantle = "#101010",
|
||||
-- crust = "#202020",
|
||||
-- },
|
||||
-- },
|
||||
integrations = {
|
||||
telescope = {
|
||||
enabled = true,
|
||||
-- style = "nvchad",
|
||||
},
|
||||
dropbar = {
|
||||
enabled = true,
|
||||
color_mode = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- ╭───────────╮
|
||||
-- │ rose-pine │
|
||||
-- ╰───────────╯
|
||||
{
|
||||
"rose-pine/neovim",
|
||||
name = "rose-pine",
|
||||
opts = {
|
||||
variant = "moon", -- auto, main, moon, or dawn
|
||||
dark_variant = "moon", -- main, moon, or dawn
|
||||
dim_inactive_windows = false,
|
||||
extend_background_behind_borders = true,
|
||||
|
||||
enable = {
|
||||
terminal = true,
|
||||
legacy_highlights = true, -- Improve compatibility for previous versions of Neovim
|
||||
migrations = true, -- Handle deprecated options automatically
|
||||
},
|
||||
|
||||
styles = {
|
||||
bold = true,
|
||||
italic = true,
|
||||
transparency = false,
|
||||
},
|
||||
|
||||
groups = {
|
||||
border = "muted",
|
||||
link = "iris",
|
||||
panel = "surface",
|
||||
|
||||
error = "love",
|
||||
hint = "iris",
|
||||
info = "foam",
|
||||
note = "pine",
|
||||
todo = "rose",
|
||||
warn = "gold",
|
||||
|
||||
git_add = "foam",
|
||||
git_change = "rose",
|
||||
git_delete = "love",
|
||||
git_dirty = "rose",
|
||||
git_ignore = "muted",
|
||||
git_merge = "iris",
|
||||
git_rename = "pine",
|
||||
git_stage = "iris",
|
||||
git_text = "rose",
|
||||
git_untracked = "subtle",
|
||||
|
||||
h1 = "iris",
|
||||
h2 = "foam",
|
||||
h3 = "rose",
|
||||
h4 = "gold",
|
||||
h5 = "pine",
|
||||
h6 = "foam",
|
||||
},
|
||||
|
||||
palette = {
|
||||
-- Override the builtin palette per variant
|
||||
-- moon = {
|
||||
-- base = '#18191a',
|
||||
-- overlay = '#363738',
|
||||
-- },
|
||||
},
|
||||
|
||||
-- NOTE: Highlight groups are extended (merged) by default. Disable this
|
||||
-- per group via `inherit = false`
|
||||
highlight_groups = {
|
||||
-- INFO:
|
||||
-- leafy search
|
||||
CurSearch = { fg = "base", bg = "leaf", inherit = false },
|
||||
Search = { fg = "text", bg = "leaf", blend = 20, inherit = false },
|
||||
},
|
||||
|
||||
before_highlight = function(group, highlight, palette)
|
||||
-- Disable all undercurls
|
||||
-- if highlight.undercurl then
|
||||
-- highlight.undercurl = false
|
||||
-- end
|
||||
--
|
||||
-- Change palette colour
|
||||
-- if highlight.fg == palette.pine then
|
||||
-- highlight.fg = palette.foam
|
||||
-- end
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- ╭───────────────────────────╮
|
||||
-- │ nordic (monet is similar) │
|
||||
-- ╰───────────────────────────╯
|
||||
-- { "AlexvZyl/nordic.nvim" },
|
||||
{ "folke/tokyonight.nvim" },
|
||||
{ "fynnfluegge/monet.nvim", name = "monet" },
|
||||
|
||||
-- { "eldritch-theme/eldritch.nvim" },
|
||||
{ "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" },
|
||||
{ "marko-cerovac/material.nvim" },
|
||||
{
|
||||
"scottmckendry/cyberdream.nvim",
|
||||
name = "cyberdream",
|
||||
"neko-night/nvim",
|
||||
lazy = false,
|
||||
-- priority = 1000,
|
||||
opts = {
|
||||
transparent = false,
|
||||
hide_fillchars = true,
|
||||
terminal_colors = true,
|
||||
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
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- ╭───────────────────────────╮
|
||||
-- │ nice dark oldschool theme │
|
||||
-- ╰───────────────────────────╯
|
||||
{ "L-Colombo/oldschool.nvim", config = true },
|
||||
|
||||
-- ╭────────────╮
|
||||
-- │ theme sets │
|
||||
-- ╰────────────╯
|
||||
{ "EdenEast/nightfox.nvim" },
|
||||
|
||||
-- ╭─────────────────────╮
|
||||
-- │ gruvbox alternative │
|
||||
-- ╰─────────────────────╯
|
||||
{
|
||||
"ribru17/bamboo.nvim",
|
||||
opts = {
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
return {
|
||||
dir = "~/.config/nvim/lua/pika/plugins/custom/terminals.nvim",
|
||||
opts = {
|
||||
visible_lines = 3,
|
||||
},
|
||||
vim.keymap.set("n", "<leader>td", ""),
|
||||
}
|
|
@ -1,16 +1,4 @@
|
|||
if true then
|
||||
return {}
|
||||
end
|
||||
-- WARNING: If this line is true, then the plugin will NOT get sourced!
|
||||
return {
|
||||
{
|
||||
"RileyGabrielson/inspire.nvim",
|
||||
config = function()
|
||||
require("inspire").setup({
|
||||
mode = "random",
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"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.
|
||||
|
@ -34,14 +22,7 @@ return {
|
|||
██████ █████████████████████ ████ █████ █████ ████ ██████
|
||||
]]
|
||||
|
||||
local inspire = require("inspire")
|
||||
local quote = inspire.get_quote()
|
||||
local centered_quote_lines = inspire.center_text(quote.text, quote.author, 52, 8, 52)
|
||||
|
||||
-- Convert the table of lines to a single string with newlines
|
||||
local centered_quote_str = table.concat(centered_quote_lines, "\n")
|
||||
|
||||
logo = string.rep("\n", 8) .. logo .. "\n\n" .. centered_quote_str .. "\n\n"
|
||||
logo = string.rep("\n", 8) .. logo .. "\n\n"
|
||||
|
||||
local opts = {
|
||||
theme = "doom",
|
||||
|
@ -56,21 +37,16 @@ return {
|
|||
require("telescope.builtin").find_files()
|
||||
end,
|
||||
desc = " Find File",
|
||||
icon = " ",
|
||||
icon = " ",
|
||||
key = "f",
|
||||
},
|
||||
{
|
||||
action = "ene | startinsert",
|
||||
desc = " New File",
|
||||
icon = " ",
|
||||
key = "n",
|
||||
},
|
||||
{ action = "ene | startinsert", desc = " New File", icon = " ", key = "n" },
|
||||
{
|
||||
action = function()
|
||||
require("telescope.builtin").oldfiles()
|
||||
end,
|
||||
desc = " Recent Files",
|
||||
icon = " ",
|
||||
icon = " ",
|
||||
key = "r",
|
||||
},
|
||||
{
|
||||
|
@ -78,21 +54,21 @@ return {
|
|||
require("telescope.builtin").live_grep()
|
||||
end,
|
||||
desc = " Find Text",
|
||||
icon = " ",
|
||||
key = "w",
|
||||
icon = " ",
|
||||
key = "g",
|
||||
},
|
||||
{
|
||||
action = function()
|
||||
require("telescope.builtin").find_files({ cwd = vim.fn.stdpath("config") })
|
||||
end,
|
||||
desc = " Search Neovim files",
|
||||
icon = " ",
|
||||
icon = " ",
|
||||
key = "c",
|
||||
},
|
||||
{
|
||||
action = 'lua require("persistence").load()',
|
||||
desc = " Restore Session",
|
||||
icon = " ",
|
||||
icon = " ",
|
||||
key = "s",
|
||||
},
|
||||
-- { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" },
|
||||
|
@ -102,7 +78,7 @@ return {
|
|||
vim.api.nvim_input("<cmd>qa<cr>")
|
||||
end,
|
||||
desc = " Quit",
|
||||
icon = " ",
|
||||
icon = " ",
|
||||
key = "q",
|
||||
},
|
||||
},
|
||||
|
@ -137,18 +113,15 @@ return {
|
|||
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"},
|
||||
{ "<leader>dq", function() require("inspire").show_quote() end, desc = "Show Inspire Quote"},
|
||||
},
|
||||
{ "<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"}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
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>"),
|
||||
-- },
|
||||
{
|
||||
"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
|
||||
{
|
||||
|
@ -29,16 +29,16 @@ return {
|
|||
-- },
|
||||
{
|
||||
-- Open in the current working directory
|
||||
"<leader>tlf",
|
||||
"<leader>Lf",
|
||||
"<cmd>Yazi cwd<cr>",
|
||||
desc = "Terminal - Open yazi in nvim's working directory",
|
||||
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>tLf",
|
||||
"<leader>lf",
|
||||
"<cmd>Yazi toggle<cr>",
|
||||
desc = "Terminal - Resume the last yazi session",
|
||||
desc = "Resume the last yazi session",
|
||||
},
|
||||
},
|
||||
---@type YaziConfig
|
||||
|
|
|
@ -1,166 +1,156 @@
|
|||
-- if true then
|
||||
-- return {}
|
||||
-- end
|
||||
-- WARNING: If this line is true, then the plugin will NOT get sourced!
|
||||
return {
|
||||
-- {
|
||||
-- "sindrets/diffview.nvim",
|
||||
-- opts = {},
|
||||
-- vim.keymap.set("n", "<leader>gd", "<CMD>DiffviewOpen<CR>", { desc = "Git DiffviewOpen" }),
|
||||
-- vim.keymap.set("n", "<leader>gc", "<CMD>DiffviewClose<CR>", { desc = "Git DiffviewClose" }),
|
||||
-- },
|
||||
-- {
|
||||
-- "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()
|
||||
{
|
||||
"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" }),
|
||||
--
|
||||
-- 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" }),
|
||||
-- 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",
|
||||
|
@ -184,7 +174,7 @@ return {
|
|||
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`
|
||||
linehl = true, -- Toggle with `:Gitsigns toggle_linehl`
|
||||
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
||||
watch_gitdir = {
|
||||
follow_files = true,
|
||||
|
|
|
@ -1,30 +1,12 @@
|
|||
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",
|
||||
|
||||
{
|
||||
"christoomey/vim-tmux-navigator",
|
||||
cmd = {
|
||||
"TmuxNavigateLeft",
|
||||
"TmuxNavigateDown",
|
||||
"TmuxNavigateUp",
|
||||
"TmuxNavigateRight",
|
||||
"TmuxNavigatePrevious",
|
||||
"TmuxNavigatorProcessList",
|
||||
},
|
||||
keys = {
|
||||
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
|
||||
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
|
||||
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
|
||||
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
|
||||
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"rachartier/tiny-devicons-auto-colors.nvim",
|
||||
dependencies = {
|
||||
|
@ -35,6 +17,4 @@ return {
|
|||
require("tiny-devicons-auto-colors").setup()
|
||||
end,
|
||||
},
|
||||
|
||||
{ "someguy0555/snake.nvim" },
|
||||
}
|
||||
|
|
|
@ -1,706 +0,0 @@
|
|||
-- if true then
|
||||
-- return {}
|
||||
-- end
|
||||
-- WARNING: If this line is true, then the plugin will NOT get sourced!
|
||||
-- NOTE: Has to be commented out if blink should be used
|
||||
|
||||
return {
|
||||
-- ╭───────────╮
|
||||
-- │ blink.cmp │
|
||||
-- ╰───────────╯
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
-- optional: provides snippets for the snippet source
|
||||
dependencies = { "rafamadriz/friendly-snippets" },
|
||||
|
||||
-- use a release tag to download pre-built binaries
|
||||
version = "1.*",
|
||||
-- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
|
||||
-- build = "cargo build --release",
|
||||
-- If you use nix, you can build from source using latest nightly rust with:
|
||||
-- build = 'nix run .#build-plugin',
|
||||
|
||||
---@module 'blink.cmp'
|
||||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
-- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
|
||||
-- 'super-tab' for mappings similar to vscode (tab to accept)
|
||||
-- 'enter' for enter to accept
|
||||
-- 'none' for no mappings
|
||||
--
|
||||
-- All presets have the following mappings:
|
||||
-- C-space: Open menu or open docs if already open
|
||||
-- C-n/C-p or Up/Down: Select next/previous item
|
||||
-- C-e: Hide menu
|
||||
-- C-k: Toggle signature help (if signature.enabled = true)
|
||||
--
|
||||
-- See :h blink-cmp-config-keymap for defining your own keymap
|
||||
cmdline = { sources = { "cmdline" } },
|
||||
keymap = {
|
||||
-- set to 'none' to disable the 'default' preset
|
||||
preset = "super-tab",
|
||||
|
||||
["<C-k>"] = { "select_prev", "fallback" },
|
||||
["<C-j>"] = { "select_next", "fallback" },
|
||||
["<C-n>"] = { "hide", "fallback" },
|
||||
|
||||
-- disable a keymap from the preset
|
||||
["<C-e>"] = {},
|
||||
["<C-p>"] = {},
|
||||
|
||||
-- show with a list of providers
|
||||
-- ["<C-space>"] = {
|
||||
-- function(cmp)
|
||||
-- cmp.show({ providers = { "snippets" } })
|
||||
-- end,
|
||||
-- },
|
||||
|
||||
-- control whether the next command will be run when using a function
|
||||
-- ["<C-n>"] = {
|
||||
-- function(cmp)
|
||||
-- if some_condition then
|
||||
-- return
|
||||
-- end -- runs the next command
|
||||
-- return true -- doesn't run the next command
|
||||
-- end,
|
||||
-- "select_next",
|
||||
-- },
|
||||
},
|
||||
|
||||
appearance = {
|
||||
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
||||
-- Adjusts spacing to ensure icons are aligned
|
||||
nerd_font_variant = "mono",
|
||||
|
||||
-- highlight_ns = vim.api.nvim_create_namespace("nvim-cmp"),
|
||||
-- Sets the fallback highlight groups to nvim-cmp's highlight groups
|
||||
-- Useful for when your theme doesn't support blink.cmp
|
||||
-- Will be removed in a future release
|
||||
|
||||
use_nvim_cmp_as_default = true,
|
||||
kind_icons = {
|
||||
Text = "",
|
||||
Method = "",
|
||||
Function = "",
|
||||
Constructor = "",
|
||||
|
||||
Field = "",
|
||||
Variable = "",
|
||||
Property = "",
|
||||
|
||||
Class = "",
|
||||
Interface = "",
|
||||
Struct = "",
|
||||
Module = "",
|
||||
|
||||
Unit = "",
|
||||
Value = "",
|
||||
Enum = "",
|
||||
EnumMember = "",
|
||||
|
||||
Keyword = "",
|
||||
Constant = "",
|
||||
|
||||
Snippet = "",
|
||||
Color = "",
|
||||
File = "",
|
||||
Reference = "",
|
||||
Folder = "",
|
||||
Event = "",
|
||||
Operator = "",
|
||||
TypeParameter = "",
|
||||
},
|
||||
},
|
||||
|
||||
-- (Default) Only show the documentation popup when manually triggered
|
||||
completion = {
|
||||
keyword = { range = "full" },
|
||||
trigger = {
|
||||
-- When true, will prefetch the completion items when entering insert mode
|
||||
prefetch_on_insert = false,
|
||||
|
||||
-- When false, will not show the completion window automatically when in a snippet
|
||||
show_in_snippet = true,
|
||||
|
||||
-- When true, will show the completion window after typing any of alphanumerics, `-` or `_`
|
||||
show_on_keyword = true,
|
||||
|
||||
-- When true, will show the completion window after typing a trigger character
|
||||
show_on_trigger_character = true,
|
||||
|
||||
-- LSPs can indicate when to show the completion window via trigger characters
|
||||
-- however, some LSPs (i.e. tsserver) return characters that would essentially
|
||||
-- always show the window. We block these by default.
|
||||
show_on_blocked_trigger_characters = { " ", "\n", "\t" },
|
||||
-- You can also block per filetype with a function:
|
||||
-- show_on_blocked_trigger_characters = function(ctx)
|
||||
-- if vim.bo.filetype == "markdown" then
|
||||
-- return { " ", "\n", "\t", ".", "/", "(", "[" }
|
||||
-- end
|
||||
-- return { " ", "\n", "\t" }
|
||||
-- end,
|
||||
|
||||
-- When both this and show_on_trigger_character are true, will show the completion window
|
||||
-- when the cursor comes after a trigger character after accepting an item
|
||||
show_on_accept_on_trigger_character = true,
|
||||
|
||||
-- When both this and show_on_trigger_character are true, will show the completion window
|
||||
-- when the cursor comes after a trigger character when entering insert mode
|
||||
show_on_insert_on_trigger_character = true,
|
||||
|
||||
-- List of trigger characters (on top of `show_on_blocked_trigger_characters`) that won't trigger
|
||||
-- the completion window when the cursor comes after a trigger character when
|
||||
-- entering insert mode/accepting an item
|
||||
show_on_x_blocked_trigger_characters = { "'", '"', "(" },
|
||||
-- or a function, similar to show_on_blocked_trigger_character
|
||||
},
|
||||
list = {
|
||||
-- Maximum number of items to display
|
||||
max_items = 128,
|
||||
|
||||
-- selection = {
|
||||
-- -- When `true`, will automatically select the first item in the completion list
|
||||
-- preselect = true,
|
||||
-- -- preselect = function(ctx) return vim.bo.filetype ~= 'markdown' end,
|
||||
--
|
||||
-- -- When `true`, inserts the completion item automatically when selecting it
|
||||
-- -- You may want to bind a key to the `cancel` command (default <C-e>) when using this option,
|
||||
-- -- which will both undo the selection and hide the completion menu
|
||||
-- auto_insert = true,
|
||||
-- -- auto_insert = function(ctx) return vim.bo.filetype ~= 'markdown' end
|
||||
-- },
|
||||
|
||||
-- cycle = {
|
||||
-- -- When `true`, calling `select_next` at the _bottom_ of the completion list
|
||||
-- -- will select the _first_ completion item.
|
||||
-- from_bottom = true,
|
||||
-- -- When `true`, calling `select_prev` at the _top_ of the completion list
|
||||
-- -- will select the _last_ completion item.
|
||||
-- from_top = true,
|
||||
-- },
|
||||
},
|
||||
|
||||
documentation = {
|
||||
auto_show = false,
|
||||
auto_show_delay_ms = 230,
|
||||
update_delay_ms = 50,
|
||||
treesitter_highlighting = false,
|
||||
draw = function(opts)
|
||||
opts.default_implementation()
|
||||
end,
|
||||
window = {
|
||||
min_width = 16,
|
||||
max_width = 80,
|
||||
max_height = 24,
|
||||
border = "padded", -- Defaults to `vim.o.winborder` on nvim 0.11+ or 'padded' when not defined/<=0.10
|
||||
winblend = 0,
|
||||
winhighlight = "Normal:BlinkCmpDoc,FloatBorder:BlinkCmpDocBorder,EndOfBuffer:BlinkCmpDoc",
|
||||
-- Note that the gutter will be disabled when border ~= 'none'
|
||||
scrollbar = true,
|
||||
},
|
||||
},
|
||||
ghost_text = {
|
||||
enabled = true,
|
||||
show_with_selection = true,
|
||||
show_without_selection = false,
|
||||
show_with_menu = true,
|
||||
show_without_menu = false,
|
||||
},
|
||||
-- ─────────────────────────────────< mini-icons config >──────────────────────────────
|
||||
menu = {
|
||||
enabled = true,
|
||||
min_width = 16,
|
||||
max_height = 10,
|
||||
border = nil, -- Defaults to `vim.o.winborder` on nvim 0.11+
|
||||
winblend = 0,
|
||||
winhighlight = "Normal:BlinkCmpMenu,FloatBorder:BlinkCmpMenuBorder,CursorLine:BlinkCmpMenuSelection,Search:None",
|
||||
-- Keep the cursor X lines away from the top/bottom of the window
|
||||
scrolloff = 2,
|
||||
-- Note that the gutter will be disabled when border ~= 'none'
|
||||
scrollbar = true,
|
||||
-- Which directions to show the window,
|
||||
-- falling back to the next direction when there's not enough space
|
||||
direction_priority = { "s", "n" },
|
||||
|
||||
-- Whether to automatically show the window when new completion items are available
|
||||
auto_show = true,
|
||||
|
||||
draw = {
|
||||
-- Aligns the keyword you've typed to a component in the menu
|
||||
align_to = "label", -- or 'none' to disable, or 'cursor' to align to the cursor
|
||||
-- Left and right padding, optionally { left, right } for different padding on each side
|
||||
padding = 1,
|
||||
-- Gap between columns
|
||||
gap = 2,
|
||||
-- Use treesitter to highlight the label text for the given list of sources
|
||||
-- treesitter = {},
|
||||
treesitter = { "lsp" },
|
||||
columns = { { "kind_icon" }, { "label", "label_description", gap = 1 } },
|
||||
components = {
|
||||
label = {
|
||||
text = function(ctx)
|
||||
return require("colorful-menu").blink_components_text(ctx)
|
||||
end,
|
||||
highlight = function(ctx)
|
||||
return require("colorful-menu").blink_components_highlight(ctx)
|
||||
end,
|
||||
},
|
||||
kind_icon = {
|
||||
text = function(ctx)
|
||||
local kind_icon, _, _ = require("mini.icons").get("lsp", ctx.kind)
|
||||
return kind_icon
|
||||
end,
|
||||
-- (optional) use highlights from mini.icons
|
||||
highlight = function(ctx)
|
||||
local _, hl, _ = require("mini.icons").get("lsp", ctx.kind)
|
||||
return hl
|
||||
end,
|
||||
},
|
||||
|
||||
-- kind = {
|
||||
-- -- (optional) use highlights from mini.icons
|
||||
-- highlight = function(ctx)
|
||||
-- local _, hl, _ = require("mini.icons").get("lsp", ctx.kind)
|
||||
-- return hl
|
||||
-- end,
|
||||
-- },
|
||||
|
||||
label_description = {
|
||||
width = { max = 30 },
|
||||
text = function(ctx)
|
||||
return ctx.label_description
|
||||
end,
|
||||
highlight = "BlinkCmpLabelDescription",
|
||||
},
|
||||
|
||||
source_name = {
|
||||
width = { max = 30 },
|
||||
text = function(ctx)
|
||||
return ctx.source_name
|
||||
end,
|
||||
highlight = "BlinkCmpSource",
|
||||
},
|
||||
|
||||
source_id = {
|
||||
width = { max = 30 },
|
||||
text = function(ctx)
|
||||
return ctx.source_id
|
||||
end,
|
||||
highlight = "BlinkCmpSource",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Default list of enabled providers defined so that you can extend it
|
||||
-- elsewhere in your config, without redefining it, due to `opts_extend`
|
||||
sources = {
|
||||
default = { "lsp", "path", "snippets", "buffer" },
|
||||
},
|
||||
|
||||
-- snippets = { preset = "default" | "luasnip" },
|
||||
|
||||
-- (Default) Rust fuzzy matcher for typo resistance and significantly better performance
|
||||
-- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation,
|
||||
-- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"`
|
||||
--
|
||||
-- See the fuzzy documentation for more information
|
||||
fuzzy = {
|
||||
implementation = "prefer_rust",
|
||||
|
||||
-- Frecency tracks the most recently/frequently used items and boosts the score of the item
|
||||
-- Note, this does not apply when using the Lua implementation.
|
||||
use_frecency = true,
|
||||
|
||||
-- Proximity bonus boosts the score of items matching nearby words
|
||||
-- Note, this does not apply when using the Lua implementation.
|
||||
use_proximity = true,
|
||||
|
||||
-- UNSAFE!! When enabled, disables the lock and fsync when writing to the frecency database. This should only be used on unsupported platforms (i.e. alpine termux)
|
||||
-- Note, this does not apply when using the Lua implementation.
|
||||
use_unsafe_no_lock = false,
|
||||
sorts = {
|
||||
-- (optionally) always prioritize exact matches
|
||||
-- 'exact',
|
||||
|
||||
-- pass a function for custom behavior
|
||||
-- function(item_a, item_b)
|
||||
-- return item_a.score > item_b.score
|
||||
-- end,
|
||||
|
||||
"score",
|
||||
"sort_text",
|
||||
},
|
||||
},
|
||||
},
|
||||
opts_extend = { "sources.default" },
|
||||
},
|
||||
|
||||
-- ─────────────────────────────────< colorful menu.nvim >─────────────────────────────────
|
||||
{
|
||||
"xzbdmw/colorful-menu.nvim",
|
||||
opts = {
|
||||
{
|
||||
ls = {
|
||||
lua_ls = {
|
||||
-- Maybe you want to dim arguments a bit.
|
||||
arguments_hl = "@comment",
|
||||
},
|
||||
gopls = {
|
||||
-- By default, we render variable/function's type in the right most side,
|
||||
-- to make them not to crowd together with the original label.
|
||||
|
||||
-- when true:
|
||||
-- foo *Foo
|
||||
-- ast "go/ast"
|
||||
|
||||
-- when false:
|
||||
-- foo *Foo
|
||||
-- ast "go/ast"
|
||||
align_type_to_right = true,
|
||||
-- When true, label for field and variable will format like "foo: Foo"
|
||||
-- instead of go's original syntax "foo Foo". If align_type_to_right is
|
||||
-- true, this option has no effect.
|
||||
add_colon_before_type = false,
|
||||
-- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36
|
||||
preserve_type_when_truncate = true,
|
||||
},
|
||||
-- for lsp_config or typescript-tools
|
||||
ts_ls = {
|
||||
-- false means do not include any extra info,
|
||||
-- see https://github.com/xzbdmw/colorful-menu.nvim/issues/42
|
||||
extra_info_hl = "@comment",
|
||||
},
|
||||
vtsls = {
|
||||
-- false means do not include any extra info,
|
||||
-- see https://github.com/xzbdmw/colorful-menu.nvim/issues/42
|
||||
extra_info_hl = "@comment",
|
||||
},
|
||||
["rust-analyzer"] = {
|
||||
-- Such as (as Iterator), (use std::io).
|
||||
extra_info_hl = "@comment",
|
||||
-- Similar to the same setting of gopls.
|
||||
align_type_to_right = true,
|
||||
-- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36
|
||||
preserve_type_when_truncate = true,
|
||||
},
|
||||
clangd = {
|
||||
-- Such as "From <stdio.h>".
|
||||
extra_info_hl = "@comment",
|
||||
-- Similar to the same setting of gopls.
|
||||
align_type_to_right = true,
|
||||
-- the hl group of leading dot of "•std::filesystem::permissions(..)"
|
||||
import_dot_hl = "@comment",
|
||||
-- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36
|
||||
preserve_type_when_truncate = true,
|
||||
},
|
||||
zls = {
|
||||
-- Similar to the same setting of gopls.
|
||||
align_type_to_right = true,
|
||||
},
|
||||
roslyn = {
|
||||
extra_info_hl = "@comment",
|
||||
},
|
||||
dartls = {
|
||||
extra_info_hl = "@comment",
|
||||
},
|
||||
-- The same applies to pyright/pylance
|
||||
basedpyright = {
|
||||
-- It is usually import path such as "os"
|
||||
extra_info_hl = "@comment",
|
||||
},
|
||||
-- If true, try to highlight "not supported" languages.
|
||||
fallback = true,
|
||||
-- this will be applied to label description for unsupport languages
|
||||
fallback_extra_info_hl = "@comment",
|
||||
},
|
||||
-- If the built-in logic fails to find a suitable highlight group for a label,
|
||||
-- this highlight is applied to the label.
|
||||
fallback_highlight = "@variable",
|
||||
-- If provided, the plugin truncates the final displayed text to
|
||||
-- this width (measured in display cells). Any highlights that extend
|
||||
-- beyond the truncation point are ignored. When set to a float
|
||||
-- between 0 and 1, it'll be treated as percentage of the width of
|
||||
-- the window: math.floor(max_width * vim.api.nvim_win_get_width(0))
|
||||
-- Default 60.
|
||||
max_width = 60,
|
||||
},
|
||||
},
|
||||
-- config = function()
|
||||
-- -- You don't need to set these options.
|
||||
-- require("colorful-menu").setup({
|
||||
-- ls = {
|
||||
-- lua_ls = {
|
||||
-- -- Maybe you want to dim arguments a bit.
|
||||
-- arguments_hl = "@comment",
|
||||
-- },
|
||||
-- gopls = {
|
||||
-- -- By default, we render variable/function's type in the right most side,
|
||||
-- -- to make them not to crowd together with the original label.
|
||||
--
|
||||
-- -- when true:
|
||||
-- -- foo *Foo
|
||||
-- -- ast "go/ast"
|
||||
--
|
||||
-- -- when false:
|
||||
-- -- foo *Foo
|
||||
-- -- ast "go/ast"
|
||||
-- align_type_to_right = true,
|
||||
-- -- When true, label for field and variable will format like "foo: Foo"
|
||||
-- -- instead of go's original syntax "foo Foo". If align_type_to_right is
|
||||
-- -- true, this option has no effect.
|
||||
-- add_colon_before_type = false,
|
||||
-- -- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36
|
||||
-- preserve_type_when_truncate = true,
|
||||
-- },
|
||||
-- -- for lsp_config or typescript-tools
|
||||
-- ts_ls = {
|
||||
-- -- false means do not include any extra info,
|
||||
-- -- see https://github.com/xzbdmw/colorful-menu.nvim/issues/42
|
||||
-- extra_info_hl = "@comment",
|
||||
-- },
|
||||
-- vtsls = {
|
||||
-- -- false means do not include any extra info,
|
||||
-- -- see https://github.com/xzbdmw/colorful-menu.nvim/issues/42
|
||||
-- extra_info_hl = "@comment",
|
||||
-- },
|
||||
-- ["rust-analyzer"] = {
|
||||
-- -- Such as (as Iterator), (use std::io).
|
||||
-- extra_info_hl = "@comment",
|
||||
-- -- Similar to the same setting of gopls.
|
||||
-- align_type_to_right = true,
|
||||
-- -- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36
|
||||
-- preserve_type_when_truncate = true,
|
||||
-- },
|
||||
-- clangd = {
|
||||
-- -- Such as "From <stdio.h>".
|
||||
-- extra_info_hl = "@comment",
|
||||
-- -- Similar to the same setting of gopls.
|
||||
-- align_type_to_right = true,
|
||||
-- -- the hl group of leading dot of "•std::filesystem::permissions(..)"
|
||||
-- import_dot_hl = "@comment",
|
||||
-- -- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36
|
||||
-- preserve_type_when_truncate = true,
|
||||
-- },
|
||||
-- zls = {
|
||||
-- -- Similar to the same setting of gopls.
|
||||
-- align_type_to_right = true,
|
||||
-- },
|
||||
-- roslyn = {
|
||||
-- extra_info_hl = "@comment",
|
||||
-- },
|
||||
-- dartls = {
|
||||
-- extra_info_hl = "@comment",
|
||||
-- },
|
||||
-- -- The same applies to pyright/pylance
|
||||
-- basedpyright = {
|
||||
-- -- It is usually import path such as "os"
|
||||
-- extra_info_hl = "@comment",
|
||||
-- },
|
||||
-- -- If true, try to highlight "not supported" languages.
|
||||
-- fallback = true,
|
||||
-- -- this will be applied to label description for unsupport languages
|
||||
-- fallback_extra_info_hl = "@comment",
|
||||
-- },
|
||||
-- -- If the built-in logic fails to find a suitable highlight group for a label,
|
||||
-- -- this highlight is applied to the label.
|
||||
-- fallback_highlight = "@variable",
|
||||
-- -- If provided, the plugin truncates the final displayed text to
|
||||
-- -- this width (measured in display cells). Any highlights that extend
|
||||
-- -- beyond the truncation point are ignored. When set to a float
|
||||
-- -- between 0 and 1, it'll be treated as percentage of the width of
|
||||
-- -- the window: math.floor(max_width * vim.api.nvim_win_get_width(0))
|
||||
-- -- Default 60.
|
||||
-- max_width = 60,
|
||||
-- })
|
||||
-- end,
|
||||
},
|
||||
-- ╭───────────╮
|
||||
-- │ lspconfig │
|
||||
-- ╰───────────╯
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
{ "saghen/blink.cmp" },
|
||||
{ "antosha417/nvim-lsp-file-operations", config = true },
|
||||
-- { "folke/neodev.nvim", opts = {} },
|
||||
},
|
||||
opts = {
|
||||
servers = {
|
||||
lua_ls = {
|
||||
function()
|
||||
lspconfig["lua_ls"].setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" },
|
||||
},
|
||||
completion = {
|
||||
callSnippet = "Replace",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
bashls = {},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
-- local lspconfig = require("lspconfig")
|
||||
-- for server, config in pairs(opts.servers) do
|
||||
-- -- passing config.capabilities to blink.cmp merges with the capabilities in your
|
||||
-- -- `opts[server].capabilities, if you've defined it
|
||||
-- config.capabilities = require("blink.cmp").get_lsp_capabilities(config.capabilities)
|
||||
-- lspconfig[server].setup(config)
|
||||
-- end
|
||||
local servers = {
|
||||
html = {},
|
||||
awk_ls = {},
|
||||
shfmt = {
|
||||
filetypes = {
|
||||
"ab",
|
||||
"bash",
|
||||
},
|
||||
},
|
||||
bashls = {
|
||||
filetypes = {
|
||||
"bash",
|
||||
"sh",
|
||||
"zsh",
|
||||
},
|
||||
},
|
||||
lua_ls = {
|
||||
-- capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" },
|
||||
},
|
||||
completion = {
|
||||
callSnippet = "Replace",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
misspell = {
|
||||
filetypes = {
|
||||
"md",
|
||||
"markdown",
|
||||
},
|
||||
},
|
||||
pyright = {
|
||||
settings = {
|
||||
python = {
|
||||
analysis = {
|
||||
autoSearchPaths = true,
|
||||
typeCheckingMode = "basic",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for name, opts in pairs(servers) do
|
||||
vim.lsp.enable(name) -- nvim v0.11.0 or above required
|
||||
vim.lsp.config(name, opts) -- nvim v0.11.0 or above required
|
||||
end
|
||||
end,
|
||||
|
||||
-- CAUTION:
|
||||
-- old config
|
||||
--
|
||||
-- config = function()
|
||||
-- local lspconfig = require("lspconfig")
|
||||
-- local capabilities = require("blink.cmp").get_lsp_capabilities()
|
||||
-- local mason_lspconfig = require("mason-lspconfig")
|
||||
--
|
||||
-- -- 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,
|
||||
},
|
||||
}
|
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,
|
||||
}
|
|
@ -46,19 +46,15 @@ return {
|
|||
})
|
||||
|
||||
mason_tool_installer.setup({
|
||||
function(server_name) -- default handler (optional)
|
||||
require("lspconfig")[server_name].setup({})
|
||||
end,
|
||||
ensure_installed = {
|
||||
"shfmt",
|
||||
"shellcheck",
|
||||
"bashls",
|
||||
"prettier",
|
||||
"stylua",
|
||||
"blade-formatter",
|
||||
"html-lsp",
|
||||
"docker-compose-language-service",
|
||||
"pylint",
|
||||
-- "eslint_d",
|
||||
-- "blade-formatter",
|
||||
"eslint_d",
|
||||
},
|
||||
})
|
||||
end,
|
||||
|
|
|
@ -1,22 +1,9 @@
|
|||
return {
|
||||
{
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
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', '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
|
||||
},
|
||||
|
||||
-- install with yarn or npm
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
build = "cd app && yarn install",
|
||||
init = function()
|
||||
vim.g.mkdp_filetypes = { "markdown" }
|
||||
end,
|
||||
ft = { "markdown" },
|
||||
|
||||
vim.keymap.set("n", "<leader>md", "<CMD>MarkdownPreviewToggle<CR>", { desc = "MarkDown preview" }),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,52 +1,22 @@
|
|||
return {
|
||||
-- INFO:
|
||||
-- mini-ai for a and i selections or other --> vin" for visual in next ""
|
||||
{
|
||||
"echasnovski/mini.ai",
|
||||
version = "*",
|
||||
version = "false",
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- TIP:
|
||||
-- ─< mini-surround for surrounding words or lines with "" or () or '' etc.. >──────────
|
||||
{
|
||||
"echasnovski/mini.surround",
|
||||
version = "*",
|
||||
version = "false",
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Move any selection in any direction
|
||||
{
|
||||
"echasnovski/mini.move",
|
||||
version = "*",
|
||||
opts = {
|
||||
-- Module mappings. Use `''` (empty string) to disable one.
|
||||
mappings = {
|
||||
-- Move visual selection in Visual mode. Defaults are Alt (Meta) + hjkl.
|
||||
left = "<S-Tab>",
|
||||
right = "<Tab>",
|
||||
down = "<S-j>",
|
||||
up = "<S-k>",
|
||||
|
||||
line_left = "<S-h>",
|
||||
line_right = "<S-l>",
|
||||
line_down = "<S-j>",
|
||||
line_up = "<S-k>",
|
||||
-- Move current line in Normal mode
|
||||
},
|
||||
|
||||
-- Options which control moving behavior
|
||||
options = {
|
||||
-- Automatically reindent selection during linewise vertical move
|
||||
reindent_linewise = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- ─< miniIcons >───────────────────────────────────────────────────────────────────────
|
||||
{
|
||||
"echasnovski/mini.icons",
|
||||
version = "*",
|
||||
version = "false",
|
||||
opts = {},
|
||||
lazy = true,
|
||||
specs = {
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
if true then
|
||||
return {}
|
||||
end
|
||||
-- WARNING: If this line is true, then the plugin will NOT get sourced!
|
||||
-- NOTE: Has to be commented out if blink should be used
|
||||
|
||||
return {
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
|
@ -142,136 +136,4 @@ return {
|
|||
-- })
|
||||
-- end,
|
||||
-- },
|
||||
{
|
||||
"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,
|
||||
},
|
||||
}
|
|
@ -138,24 +138,6 @@ return {
|
|||
),
|
||||
},
|
||||
|
||||
-- ─< ERROR: Those comments are really great! >──────────────────────────────────────────
|
||||
-- ─────────────────────< NOTE: And they can be pretty satisfying... >─────────────────────
|
||||
-- ╭──────────────────────────────────────╮
|
||||
-- │ WARN: Also they can change in color! │
|
||||
-- ╰──────────────────────────────────────╯
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = {
|
||||
keywords = {
|
||||
NOTE = { icon = " ", color = "hint", alt = { "TIP" } },
|
||||
INFO = { icon = " ", color = "info", alt = { "INFORMATION", "IMPORTANT" } },
|
||||
ERROR = { icon = " ", color = "error", alt = { "ERR", "CAUTION" } },
|
||||
WARNING = { icon = " ", color = "warning", alt = { "WARN", "WHY" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- ╭───────────╮
|
||||
-- │ colorizer │
|
||||
-- ╰───────────╯
|
||||
|
@ -201,7 +183,7 @@ return {
|
|||
enable_named_colors = true,
|
||||
|
||||
---Highlight tailwind colors, e.g. 'bg-blue-500'
|
||||
enable_tailwind = true,
|
||||
enable_tailwind = false,
|
||||
|
||||
---Set custom colors
|
||||
---Label must be properly escaped with '%' to adhere to `string.gmatch`
|
||||
|
@ -220,21 +202,21 @@ return {
|
|||
-- ╭──────────────────────────────────────╮
|
||||
-- │ 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" },
|
||||
-- },
|
||||
-- },
|
||||
{
|
||||
"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) │
|
||||
|
@ -244,6 +226,23 @@ return {
|
|||
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 │
|
||||
|
@ -252,7 +251,7 @@ return {
|
|||
{
|
||||
"chrisgrieser/nvim-scissors",
|
||||
lazy = false,
|
||||
dependencies = { "garymjr/nvim-snippets" }, -- "nvim-telescope/telescope.nvim"
|
||||
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
|
||||
},
|
||||
|
@ -261,9 +260,4 @@ return {
|
|||
vim.keymap.set("n", "<leader>sm", "<CMD>:ScissorsEditSnippet<cr>"),
|
||||
vim.keymap.set("v", "<leader>sa", "<CMD>:ScissorsAddNewSnippet<cr>"),
|
||||
},
|
||||
|
||||
{
|
||||
"gbprod/substitute.nvim",
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,415 +0,0 @@
|
|||
return {
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
---@type snacks.Config
|
||||
opts = {
|
||||
explorer = { enabled = false },
|
||||
|
||||
bigfile = { enabled = true },
|
||||
quickfile = { enabled = true },
|
||||
|
||||
---@class snacks.animate.Config
|
||||
---@field easing? snacks.animate.easing|snacks.animate.easing.Fn
|
||||
animate = {
|
||||
enabled = false,
|
||||
---@type snacks.animate.Duration|number
|
||||
duration = 4, -- ms per step
|
||||
|
||||
easing = "linear",
|
||||
fps = 75, -- frames per second. Global setting for all animations
|
||||
},
|
||||
notifier = { enabled = true },
|
||||
indent = { enabled = true },
|
||||
toggle = { enabled = true },
|
||||
scroll = { enabled = true },
|
||||
|
||||
---@class snacks.dashboard.Config
|
||||
---@field enabled? boolean
|
||||
---@field sections snacks.dashboard.Section
|
||||
---@field formats table<string, snacks.dashboard.Text|fun(item:snacks.dashboard.Item, ctx:snacks.dashboard.Format.ctx):snacks.dashboard.Text>
|
||||
dashboard = {
|
||||
row = nil,
|
||||
col = nil,
|
||||
pane_gap = 2,
|
||||
enabled = true,
|
||||
sections = {
|
||||
{ section = "header" },
|
||||
{
|
||||
pane = 2,
|
||||
section = "terminal",
|
||||
cmd = "colorscript -e square",
|
||||
height = 6,
|
||||
padding = 1,
|
||||
},
|
||||
{ section = "keys", gap = 1, padding = 1 },
|
||||
{
|
||||
pane = 2,
|
||||
icon = " ",
|
||||
title = "Recent Files",
|
||||
section = "recent_files",
|
||||
indent = 2,
|
||||
padding = 1,
|
||||
},
|
||||
{ pane = 2, icon = " ", title = "Projects", section = "projects", indent = 2, padding = 1 },
|
||||
{
|
||||
pane = 2,
|
||||
icon = " ",
|
||||
title = "Git Status",
|
||||
section = "terminal",
|
||||
enabled = function()
|
||||
return Snacks.git.get_root() ~= nil
|
||||
end,
|
||||
cmd = "git status --short --branch --renames",
|
||||
height = 5,
|
||||
padding = 1,
|
||||
ttl = 5 * 60,
|
||||
indent = 3,
|
||||
},
|
||||
{ section = "startup" },
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
-- Top Pickers & Explorer
|
||||
{
|
||||
"<leader>sf",
|
||||
function()
|
||||
Snacks.picker.smart()
|
||||
end,
|
||||
desc = "Smart Find Files",
|
||||
},
|
||||
{
|
||||
"<leader><space>",
|
||||
function()
|
||||
Snacks.picker.buffers()
|
||||
end,
|
||||
desc = "Buffers",
|
||||
},
|
||||
{
|
||||
"<leader>/",
|
||||
function()
|
||||
Snacks.picker.grep()
|
||||
end,
|
||||
desc = "Grep",
|
||||
},
|
||||
{
|
||||
"<leader>:",
|
||||
function()
|
||||
Snacks.picker.command_history()
|
||||
end,
|
||||
desc = "Command History",
|
||||
},
|
||||
{
|
||||
"<leader>n",
|
||||
function()
|
||||
Snacks.picker.notifications()
|
||||
end,
|
||||
desc = "Notification History",
|
||||
},
|
||||
-- {
|
||||
-- "<leader>e",
|
||||
-- function()
|
||||
-- Snacks.explorer()
|
||||
-- end,
|
||||
-- desc = "File Explorer",
|
||||
-- },
|
||||
-- find
|
||||
-- {
|
||||
-- "<leader>fb",
|
||||
-- function()
|
||||
-- Snacks.picker.buffers()
|
||||
-- end,
|
||||
-- desc = "Buffers",
|
||||
-- },
|
||||
|
||||
-- both of the next two bindings are the same, just for different keymaps
|
||||
-- ─< find [N]eovim config >────────────────────────────────────────────────────────────
|
||||
{
|
||||
"<leader>fn",
|
||||
function()
|
||||
Snacks.picker.files({ cwd = vim.fn.stdpath("config") })
|
||||
end,
|
||||
desc = "Find Config File",
|
||||
},
|
||||
-- ─< find neovim [C]onfig >────────────────────────────────────────────────────────────
|
||||
{
|
||||
"<leader>fc",
|
||||
function()
|
||||
Snacks.picker.files({ cwd = vim.fn.stdpath("config") })
|
||||
end,
|
||||
desc = "Find Config File",
|
||||
},
|
||||
|
||||
{
|
||||
"<leader>ff",
|
||||
function()
|
||||
Snacks.picker.files()
|
||||
end,
|
||||
desc = "Find Files",
|
||||
},
|
||||
{
|
||||
"<leader>fg",
|
||||
function()
|
||||
Snacks.picker.git_files()
|
||||
end,
|
||||
desc = "Find Git Files",
|
||||
},
|
||||
{
|
||||
"<leader>fp",
|
||||
function()
|
||||
Snacks.picker.projects()
|
||||
end,
|
||||
desc = "Projects",
|
||||
},
|
||||
{
|
||||
"<leader>fr",
|
||||
function()
|
||||
Snacks.picker.recent()
|
||||
end,
|
||||
desc = "Recent",
|
||||
},
|
||||
-- git
|
||||
{
|
||||
"<leader>gb",
|
||||
function()
|
||||
Snacks.picker.git_branches()
|
||||
end,
|
||||
desc = "Git Branches",
|
||||
},
|
||||
{
|
||||
"<leader>gl",
|
||||
function()
|
||||
Snacks.picker.git_log()
|
||||
end,
|
||||
desc = "Git Log",
|
||||
},
|
||||
{
|
||||
"<leader>gL",
|
||||
function()
|
||||
Snacks.picker.git_log_line()
|
||||
end,
|
||||
desc = "Git Log Line",
|
||||
},
|
||||
{
|
||||
"<leader>gs",
|
||||
function()
|
||||
Snacks.picker.git_status()
|
||||
end,
|
||||
desc = "Git Status",
|
||||
},
|
||||
{
|
||||
"<leader>gS",
|
||||
function()
|
||||
Snacks.picker.git_stash()
|
||||
end,
|
||||
desc = "Git Stash",
|
||||
},
|
||||
{
|
||||
"<leader>gd",
|
||||
function()
|
||||
Snacks.picker.git_diff()
|
||||
end,
|
||||
desc = "Git Diff (Hunks)",
|
||||
},
|
||||
{
|
||||
"<leader>gf",
|
||||
function()
|
||||
Snacks.picker.git_log_file()
|
||||
end,
|
||||
desc = "Git Log File",
|
||||
},
|
||||
-- Grep
|
||||
{
|
||||
"<leader>sg",
|
||||
function()
|
||||
Snacks.picker.grep()
|
||||
end,
|
||||
desc = "Grep",
|
||||
},
|
||||
{
|
||||
"<leader>sw",
|
||||
function()
|
||||
Snacks.picker.grep_word()
|
||||
end,
|
||||
desc = "Visual selection or word",
|
||||
mode = { "n", "x" },
|
||||
},
|
||||
{
|
||||
"<leader>T",
|
||||
function()
|
||||
Snacks.picker.colorschemes()
|
||||
end,
|
||||
desc = "Colorschemes",
|
||||
},
|
||||
-- LSP
|
||||
{
|
||||
"gd",
|
||||
function()
|
||||
Snacks.picker.lsp_definitions()
|
||||
end,
|
||||
desc = "Goto Definition",
|
||||
},
|
||||
{
|
||||
"gD",
|
||||
function()
|
||||
Snacks.picker.lsp_declarations()
|
||||
end,
|
||||
desc = "Goto Declaration",
|
||||
},
|
||||
{
|
||||
"gr",
|
||||
function()
|
||||
Snacks.picker.lsp_references()
|
||||
end,
|
||||
nowait = true,
|
||||
desc = "References",
|
||||
},
|
||||
{
|
||||
"gI",
|
||||
function()
|
||||
Snacks.picker.lsp_implementations()
|
||||
end,
|
||||
desc = "Goto Implementation",
|
||||
},
|
||||
{
|
||||
"gy",
|
||||
function()
|
||||
Snacks.picker.lsp_type_definitions()
|
||||
end,
|
||||
desc = "Goto T[y]pe Definition",
|
||||
},
|
||||
-- Other
|
||||
{
|
||||
"<leader>z",
|
||||
function()
|
||||
Snacks.zen()
|
||||
end,
|
||||
desc = "Toggle Zen Mode",
|
||||
},
|
||||
{
|
||||
"<leader>Z",
|
||||
function()
|
||||
Snacks.zen.zoom()
|
||||
end,
|
||||
desc = "Toggle Zoom",
|
||||
},
|
||||
{
|
||||
"<leader>n",
|
||||
function()
|
||||
Snacks.notifier.show_history()
|
||||
end,
|
||||
desc = "Notification History",
|
||||
},
|
||||
{
|
||||
"<leader>cR",
|
||||
function()
|
||||
Snacks.rename.rename_file()
|
||||
end,
|
||||
desc = "Rename File",
|
||||
},
|
||||
{
|
||||
"<leader>gB",
|
||||
function()
|
||||
Snacks.gitbrowse()
|
||||
end,
|
||||
desc = "Git Browse",
|
||||
mode = { "n", "v" },
|
||||
},
|
||||
{
|
||||
"<leader>gg",
|
||||
function()
|
||||
Snacks.lazygit()
|
||||
end,
|
||||
desc = "Lazygit",
|
||||
},
|
||||
{
|
||||
"<leader>un",
|
||||
function()
|
||||
Snacks.notifier.hide()
|
||||
end,
|
||||
desc = "Dismiss All Notifications",
|
||||
},
|
||||
{
|
||||
"<leader>N",
|
||||
desc = "Neovim News",
|
||||
function()
|
||||
Snacks.win({
|
||||
file = vim.api.nvim_get_runtime_file("doc/news.txt", false)[1],
|
||||
width = 0.6,
|
||||
height = 0.6,
|
||||
wo = {
|
||||
spell = false,
|
||||
wrap = false,
|
||||
signcolumn = "yes",
|
||||
statuscolumn = " ",
|
||||
conceallevel = 3,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
init = function()
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "VeryLazy",
|
||||
callback = function()
|
||||
-- Setup some globals for debugging (lazy-loaded)
|
||||
_G.dd = function(...)
|
||||
Snacks.debug.inspect(...)
|
||||
end
|
||||
_G.bt = function()
|
||||
Snacks.debug.backtrace()
|
||||
end
|
||||
vim.print = _G.dd -- Override print to use snacks for `:=` command
|
||||
|
||||
-- Create some toggle mappings
|
||||
Snacks.toggle.option("spell", { name = "Spelling" }):map("<leader>us")
|
||||
Snacks.toggle.option("wrap", { name = "Wrap" }):map("<leader>uw")
|
||||
Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map("<leader>uL")
|
||||
Snacks.toggle.diagnostics():map("<leader>ud")
|
||||
Snacks.toggle.line_number():map("<leader>ul")
|
||||
Snacks.toggle
|
||||
.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 })
|
||||
:map("<leader>uc")
|
||||
Snacks.toggle.treesitter():map("<leader>uT")
|
||||
Snacks.toggle
|
||||
.option("background", { off = "light", on = "dark", name = "Dark Background" })
|
||||
:map("<leader>ub")
|
||||
Snacks.toggle.inlay_hints():map("<leader>uh")
|
||||
Snacks.toggle.indent():map("<leader>ug")
|
||||
Snacks.toggle.dim():map("<leader>uD")
|
||||
end,
|
||||
})
|
||||
end,
|
||||
dependencies = {
|
||||
-- {
|
||||
-- "RileyGabrielson/inspire.nvim",
|
||||
-- config = function()
|
||||
-- require("inspire").setup({
|
||||
-- -- 'daily' or 'random'
|
||||
-- mode = "daily",
|
||||
--
|
||||
-- -- Override the default quotes
|
||||
-- quotes = {
|
||||
-- { text = "My First Custom Quote", author = "Me" },
|
||||
-- { text = "My Second Custom Quote", author = "Myself" },
|
||||
-- { text = "My Third Custom Quote", author = "and I" },
|
||||
-- },
|
||||
-- })
|
||||
-- end,
|
||||
-- },
|
||||
{
|
||||
"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" },
|
||||
-- { "<leader>dq", function() require("inspire").show_quote() end, desc = "Show Inspire Quote"},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
6
lua/pika/plugins/surround.lua
Normal file
6
lua/pika/plugins/surround.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
"kylechui/nvim-surround",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
||||
config = true,
|
||||
}
|
|
@ -1,8 +1,3 @@
|
|||
if true then
|
||||
return {}
|
||||
end
|
||||
-- WARNING: If this line is true, then the plugin will NOT get sourced!
|
||||
--
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
branch = "0.1.x",
|
||||
|
@ -30,32 +25,38 @@ return {
|
|||
|
||||
telescope.load_extension("fzf")
|
||||
|
||||
-- ─< set keymaps >─────────────────────────────────────────────────────────────────────
|
||||
-- set keymaps
|
||||
local map = vim.keymap.set -- for conciseness
|
||||
local builtin = require("telescope.builtin")
|
||||
-- ─────────────────────────────────< Telescope mappings >─────────────────────────────────
|
||||
map("n", "<leader>T", "<cmd>Telescope colorscheme<CR>")
|
||||
|
||||
map("n", "<leader>ff", "<cmd>Telescope find_files<CR>", { noremap = true, silent = true, desc = "Find Files" })
|
||||
-- map("n", "<leader>ff", builtin.find_files, { desc = "Find Files" })
|
||||
map("n", "<leader>fw", "<cmd>Telescope live_grep<CR>", { noremap = true, silent = true, desc = "Find Word" })
|
||||
-- map("n", "<leader>fw", builtin.live_grep, { desc = "Find word" })
|
||||
-- map("n", "<leader>fb", "<cmd>Telescope buffers<CR>", { noremap = true, silent = true, desc = "Find Buffers" })
|
||||
map("n", "<leader><leader>", builtin.buffers, { desc = "[ ] Find existing buffers" })
|
||||
map("n", "<leader>fn", function()
|
||||
-- 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 = "Find Neovim files" })
|
||||
map("n", "<leader>fh", builtin.help_tags, { desc = "Find Help" })
|
||||
map("n", "<leader>fk", builtin.keymaps, { desc = "Find Keymaps" })
|
||||
map("n", "<leader>fd", builtin.diagnostics, { desc = "Find Diagnostics" })
|
||||
map("n", "<leader>fo", builtin.oldfiles, { desc = "Find old/Recent Files" })
|
||||
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 = "Search in current buffer" })
|
||||
map("n", "<leader>f/", function()
|
||||
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 = "Search in Open Files" })
|
||||
end, { desc = "[S]earch [/] in Open Files" })
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -23,19 +23,19 @@ return {
|
|||
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 = " ",
|
||||
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 = " ",
|
||||
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 = 30,
|
||||
delay = 80,
|
||||
reveal = { "close" },
|
||||
hide = { "nvim_lsp" },
|
||||
},
|
||||
|
@ -51,7 +51,6 @@ return {
|
|||
vim.keymap.set("n", "<S-Tab>", "<cmd>BufferLineCyclePrev<CR>")
|
||||
end,
|
||||
},
|
||||
|
||||
-- ╭───────────────────────────────────╮
|
||||
-- │ cmdline - for nice command inputs │
|
||||
-- ╰───────────────────────────────────╯
|
||||
|
@ -82,17 +81,6 @@ return {
|
|||
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 }),
|
||||
|
@ -171,170 +159,106 @@ return {
|
|||
-- char = "│",
|
||||
-- tab_char = "│",
|
||||
},
|
||||
scope = { enabled = true },
|
||||
},
|
||||
},
|
||||
|
||||
-- ╭──────────────────╮
|
||||
-- │ 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,
|
||||
-- vim.keymap.set("n", "<leader>tn", "<cmd>Telescope notify<CR>", { desc = "Telescope show 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,
|
||||
|
||||
-- ╭────────────────────────────────╮
|
||||
-- │ lualine - another bar for nvim │
|
||||
-- ╰────────────────────────────────╯
|
||||
-- {
|
||||
-- "nvim-lualine/lualine.nvim",
|
||||
-- opts = {
|
||||
-- options = {
|
||||
-- theme = bubbles_theme,
|
||||
-- component_separators = "",
|
||||
-- section_separators = { left = "", right = "" },
|
||||
-- },
|
||||
-- sections = {
|
||||
-- lualine_a = { { "mode", separator = { left = "" }, right_padding = 4 } },
|
||||
-- lualine_b = { "filename", "branch" },
|
||||
-- lualine_c = {
|
||||
-- "%=",
|
||||
-- "cwd",
|
||||
-- },
|
||||
-- lualine_x = {},
|
||||
-- lualine_y = { "filetype", "progress" },
|
||||
-- lualine_z = {
|
||||
-- { "location", separator = { right = "" }, left_padding = 4 },
|
||||
-- },
|
||||
-- },
|
||||
-- inactive_sections = {
|
||||
-- lualine_a = { "filename" },
|
||||
-- lualine_b = {},
|
||||
-- lualine_c = {},
|
||||
-- lualine_x = {},
|
||||
-- lualine_y = {},
|
||||
-- lualine_z = { "location" },
|
||||
-- },
|
||||
-- tabline = {},
|
||||
-- extensions = {},
|
||||
-- },
|
||||
-- },
|
||||
-- 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",
|
||||
-- INFO: pure
|
||||
--
|
||||
-- opts = {
|
||||
-- style = "fg",
|
||||
-- bold = true,
|
||||
-- hl = {
|
||||
-- secondary = "Comment",
|
||||
-- },
|
||||
-- configs = {
|
||||
-- mode = {
|
||||
-- hl = {
|
||||
-- normal = "Comment",
|
||||
-- insert = "Normal",
|
||||
-- pending = "Normal",
|
||||
-- visual = "Normal",
|
||||
-- command = "Normal",
|
||||
-- },
|
||||
-- },
|
||||
-- path = {
|
||||
-- hl = {
|
||||
-- primary = "Label",
|
||||
-- },
|
||||
-- },
|
||||
-- git = {
|
||||
-- hl = {
|
||||
-- primary = "Function",
|
||||
-- },
|
||||
-- },
|
||||
-- filetype_lsp = {
|
||||
-- hl = {
|
||||
-- primary = "String",
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- INFO: rainbow
|
||||
--
|
||||
opts = {
|
||||
style = "bg",
|
||||
configs = {
|
||||
path = {
|
||||
hl = {
|
||||
primary = "Define",
|
||||
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 = {
|
||||
hl = {
|
||||
primary = "Function",
|
||||
branch = "",
|
||||
},
|
||||
folder = " ",
|
||||
lines = " ",
|
||||
},
|
||||
},
|
||||
filetype_lsp = {
|
||||
hl = {
|
||||
primary = "String",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- INFO: slashes
|
||||
--
|
||||
-- opts = {
|
||||
-- spaces = {
|
||||
-- components = "",
|
||||
-- left = "",
|
||||
-- right = "",
|
||||
-- },
|
||||
-- sep = {
|
||||
-- hide = {
|
||||
-- first = true,
|
||||
-- last = true,
|
||||
-- },
|
||||
-- left = "",
|
||||
-- right = "",
|
||||
-- },
|
||||
-- },
|
||||
},
|
||||
|
||||
-- ╭────────────────────────────────────────╮
|
||||
|
@ -344,8 +268,8 @@ return {
|
|||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
init = function()
|
||||
vim.o.timeout = false
|
||||
vim.o.timeoutlen = 0
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 350
|
||||
end,
|
||||
opts = {
|
||||
-- your configuration comes here
|
||||
|
|
2
snippets
2
snippets
|
@ -1 +1 @@
|
|||
Subproject commit 46204c46e73040adc381ed792500f7c5b2c194ea
|
||||
Subproject commit e7f703ecb74d00eeea817b0b677c8715bdc23521
|
Loading…
Add table
Add a link
Reference in a new issue