Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d803c6ad53 | ||
![]() |
600a7163fa | ||
![]() |
8c9e742235 |
28 changed files with 506 additions and 1548 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -15,4 +15,3 @@
|
|||
|
||||
lazy-lock.json
|
||||
cd-project.nvim.json
|
||||
# custom/
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
get_ip() {
|
||||
ip a | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d/ -f1 | head -n 1
|
||||
}
|
18
init.lua
18
init.lua
|
@ -1,13 +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("rose-pine-moon")
|
||||
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>", "")
|
||||
|
@ -10,16 +8,17 @@ nomap("n", "q", "")
|
|||
nomap("v", "q", "")
|
||||
nomap("v", "<leader>S", "")
|
||||
|
||||
-- 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" })
|
||||
|
@ -29,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>")
|
||||
|
||||
|
@ -48,31 +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>]])
|
||||
-- ───────────────< 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" })
|
||||
|
|
|
@ -53,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
|
||||
|
@ -81,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,61 +0,0 @@
|
|||
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,123 +1,34 @@
|
|||
return {
|
||||
-- { "folke/tokyonight.nvim" },
|
||||
{ "catppuccin/nvim", name = "catppuccin" },
|
||||
{ "EdenEast/nightfox.nvim" },
|
||||
{ "folke/tokyonight.nvim" },
|
||||
{ "fynnfluegge/monet.nvim", name = "monet" },
|
||||
{ "L-Colombo/oldschool.nvim", config = true },
|
||||
{ "rose-pine/neovim", name = "rose-pine" },
|
||||
{ "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" },
|
||||
{ "ptdewey/darkearth-nvim" },
|
||||
{ "marko-cerovac/material.nvim" },
|
||||
{
|
||||
"AstroNvim/astrotheme",
|
||||
opts = {
|
||||
{
|
||||
palette = "astrodark", -- String of the default palette to use when calling `:colorscheme astrotheme`
|
||||
background = { -- :h background, palettes to use when using the core vim background colors
|
||||
light = "astrolight",
|
||||
dark = "astrodark",
|
||||
},
|
||||
|
||||
style = {
|
||||
transparent = false, -- Bool value, toggles transparency.
|
||||
inactive = true, -- Bool value, toggles inactive window color.
|
||||
float = true, -- Bool value, toggles floating windows background colors.
|
||||
neotree = true, -- Bool value, toggles neo-trees background color.
|
||||
border = true, -- Bool value, toggles borders.
|
||||
title_invert = true, -- Bool value, swaps text and background colors.
|
||||
italic_comments = true, -- Bool value, toggles italic comments.
|
||||
simple_syntax_colors = true, -- Bool value, simplifies the amounts of colors used for syntax highlighting.
|
||||
},
|
||||
|
||||
termguicolors = true, -- Bool value, toggles if termguicolors are set by AstroTheme.
|
||||
|
||||
terminal_color = true, -- Bool value, toggles if terminal_colors are set by AstroTheme.
|
||||
|
||||
plugin_default = "auto", -- Sets how all plugins will be loaded
|
||||
-- "auto": Uses lazy / packer enabled plugins to load highlights.
|
||||
-- true: Enables all plugins highlights.
|
||||
-- false: Disables all plugins.
|
||||
|
||||
plugins = { -- Allows for individual plugin overrides using plugin name and value from above.
|
||||
["bufferline.nvim"] = false,
|
||||
},
|
||||
|
||||
palettes = {
|
||||
global = { -- Globally accessible palettes, theme palettes take priority.
|
||||
my_grey = "#ebebeb",
|
||||
my_color = "#ffffff",
|
||||
},
|
||||
astrodark = { -- Extend or modify astrodarks palette colors
|
||||
ui = {
|
||||
red = "#800010", -- Overrides astrodarks red UI color
|
||||
accent = "#CC83E3", -- Changes the accent color of astrodark.
|
||||
},
|
||||
syntax = {
|
||||
cyan = "#800010", -- Overrides astrodarks cyan syntax color
|
||||
comments = "#CC83E3", -- Overrides astrodarks comment color.
|
||||
},
|
||||
my_color = "#000000", -- Overrides global.my_color
|
||||
},
|
||||
},
|
||||
|
||||
highlights = {
|
||||
global = { -- Add or modify hl groups globally, theme specific hl groups take priority.
|
||||
modify_hl_groups = function(hl, c)
|
||||
hl.PluginColor4 = { fg = c.my_grey, bg = c.none }
|
||||
end,
|
||||
["@String"] = { fg = "#ff00ff", bg = "NONE" },
|
||||
},
|
||||
astrodark = {
|
||||
-- first parameter is the highlight table and the second parameter is the color palette table
|
||||
modify_hl_groups = function(hl, c) -- modify_hl_groups function allows you to modify hl groups,
|
||||
hl.Comment.fg = c.my_color
|
||||
hl.Comment.italic = true
|
||||
end,
|
||||
["@String"] = { fg = "#ff00ff", bg = "NONE" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- {
|
||||
-- "ferdinandrau/lavish.nvim",
|
||||
-- opts = {
|
||||
-- style = {
|
||||
-- italic_comments = false,
|
||||
-- italic_strings = false,
|
||||
-- transparent = false,
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- {
|
||||
-- "neko-night/nvim",
|
||||
-- lazy = false,
|
||||
-- -- priority = 1000,
|
||||
-- opts = {
|
||||
-- transparent = false, -- Enable this to disable setting the background color
|
||||
-- terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
|
||||
-- styles = {
|
||||
-- -- Style to be applied to different syntax groups
|
||||
-- -- Value is any valid attr-list value for `:help nvim_set_hl`
|
||||
-- comments = { italic = false },
|
||||
-- keywords = { italic = true },
|
||||
-- functions = { bold = true },
|
||||
-- variables = { bold = true },
|
||||
-- -- Background styles. Can be "dark", "transparent" or "normal"
|
||||
-- sidebars = "dark", -- style for sidebars, see below
|
||||
-- floats = "dark", -- style for floating windows
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
{
|
||||
"scottmckendry/cyberdream.nvim",
|
||||
name = "cyberdream",
|
||||
"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
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -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,12 +1,4 @@
|
|||
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.
|
||||
|
@ -30,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",
|
||||
|
@ -52,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",
|
||||
},
|
||||
{
|
||||
|
@ -74,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" },
|
||||
|
@ -98,7 +78,7 @@ return {
|
|||
vim.api.nvim_input("<cmd>qa<cr>")
|
||||
end,
|
||||
desc = " Quit",
|
||||
icon = " ",
|
||||
icon = " ",
|
||||
key = "q",
|
||||
},
|
||||
},
|
||||
|
@ -133,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,162 +1,156 @@
|
|||
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",
|
||||
|
@ -180,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,590 +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-q>"] = { "hide", "fallback" },
|
||||
|
||||
-- disable a keymap from the preset
|
||||
["<C-e>"] = {},
|
||||
["<C-p>"] = {},
|
||||
["<C-n>"] = {},
|
||||
|
||||
-- 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,
|
||||
},
|
||||
|
||||
-- (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 = {} },
|
||||
},
|
||||
|
||||
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,
|
||||
}
|
|
@ -4,9 +4,6 @@ return {
|
|||
"williamboman/mason-lspconfig.nvim",
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
},
|
||||
-- opts = {
|
||||
--
|
||||
-- }
|
||||
config = function()
|
||||
-- import mason
|
||||
local mason = require("mason")
|
||||
|
@ -49,9 +46,6 @@ return {
|
|||
})
|
||||
|
||||
mason_tool_installer.setup({
|
||||
function(server_name) -- default handler (optional)
|
||||
require("lspconfig")[server_name].setup({})
|
||||
end,
|
||||
ensure_installed = {
|
||||
"shfmt",
|
||||
"prettier",
|
||||
|
|
|
@ -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) │
|
||||
|
|
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,
|
||||
}
|
|
@ -25,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,21 +159,8 @@ 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 │
|
||||
-- ╰────────────────────────────────────╯
|
||||
|
@ -217,135 +192,74 @@ return {
|
|||
})
|
||||
vim.notify = require("notify")
|
||||
end,
|
||||
vim.keymap.set("n", "<leader>tn", "<cmd>Telescope notify<CR>", { desc = "Telescope show Notifications" }),
|
||||
},
|
||||
|
||||
-- ╭────────────────────────────────╮
|
||||
-- │ 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 = {},
|
||||
},
|
||||
},
|
||||
|
||||
-- ╭──────────────────────────────╮
|
||||
-- │ slimline - nice bar for nvim │
|
||||
-- ╰──────────────────────────────╯
|
||||
-- {
|
||||
-- "sschleemilch/slimline.nvim",
|
||||
-- opts = {
|
||||
-- bold = true, -- makes primary parts and mode bold
|
||||
-- verbose_mode = false, -- Mode as single letter or as a word
|
||||
-- style = "bg", -- or "fg". Whether highlights should be applied to bg or fg of components
|
||||
-- mode_follow_style = true, -- Whether the mode color components should follow the style option
|
||||
-- spaces = {
|
||||
-- components = "─",
|
||||
-- left = "─",
|
||||
-- right = "─",
|
||||
-- },
|
||||
-- configs = {
|
||||
-- path = {
|
||||
-- hl = {
|
||||
-- primary = "Define",
|
||||
-- },
|
||||
-- },
|
||||
-- git = {
|
||||
-- hl = {
|
||||
-- primary = "Function",
|
||||
-- },
|
||||
-- },
|
||||
-- diagnostics = {
|
||||
-- hl = {
|
||||
-- primary = "Statement",
|
||||
-- },
|
||||
-- },
|
||||
-- filetype_lsp = {
|
||||
-- hl = {
|
||||
-- primary = "String",
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- components = { -- Choose components and their location
|
||||
-- left = {
|
||||
-- "mode",
|
||||
-- "progress",
|
||||
-- -- "path",
|
||||
-- -- "git",
|
||||
-- },
|
||||
-- center = {
|
||||
{
|
||||
-- Calls `require('slimline').setup({})`
|
||||
"sschleemilch/slimline.nvim",
|
||||
opts = {
|
||||
bold = true, -- makes primary parts and mode bold
|
||||
verbose_mode = false, -- Mode as single letter or as a word
|
||||
style = "bg", -- or "fg". Whether highlights should be applied to bg or fg of components
|
||||
mode_follow_style = true, -- Whether the mode color components should follow the style option
|
||||
components = { -- Choose components and their location
|
||||
left = {
|
||||
"mode",
|
||||
-- "path",
|
||||
-- "git",
|
||||
-- },
|
||||
-- right = {
|
||||
-- "diagnostics",
|
||||
-- "filetype_lsp",
|
||||
-- "progress",
|
||||
-- },
|
||||
-- },
|
||||
-- sep = {
|
||||
-- hide = {
|
||||
-- first = false, -- hides the first separator
|
||||
-- last = false, -- hides the last separator
|
||||
-- },
|
||||
-- left = "", -- left separator of components
|
||||
-- right = "", -- right separator of components
|
||||
-- },
|
||||
-- hl = {
|
||||
-- modes = {
|
||||
-- normal = "Type", -- highlight base of modes
|
||||
-- insert = "Function",
|
||||
-- pending = "Boolean",
|
||||
-- visual = "Keyword",
|
||||
-- command = "String",
|
||||
-- },
|
||||
-- base = "Comment", -- highlight of everything in in between components
|
||||
-- primary = "Normal", -- highlight of primary parts (e.g. filename)
|
||||
-- secondary = "Comment", -- highlight of secondary parts (e.g. filepath)
|
||||
-- },
|
||||
-- icons = {
|
||||
-- diagnostics = {
|
||||
-- ERROR = " ",
|
||||
-- WARN = " ",
|
||||
-- HINT = " ",
|
||||
-- INFO = " ",
|
||||
-- },
|
||||
-- git = {
|
||||
-- branch = "",
|
||||
-- },
|
||||
-- folder = " ",
|
||||
-- lines = " ",
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
},
|
||||
center = {
|
||||
"path",
|
||||
"git",
|
||||
},
|
||||
right = {
|
||||
"diagnostics",
|
||||
"filetype_lsp",
|
||||
"progress",
|
||||
},
|
||||
},
|
||||
spaces = {
|
||||
components = " ", -- string between components
|
||||
left = " ", -- string at the start of the line
|
||||
right = " ", -- string at the end of the line
|
||||
},
|
||||
sep = {
|
||||
hide = {
|
||||
first = false, -- hides the first separator
|
||||
last = false, -- hides the last separator
|
||||
},
|
||||
left = "", -- left separator of components
|
||||
right = "", -- right separator of components
|
||||
},
|
||||
hl = {
|
||||
modes = {
|
||||
normal = "Type", -- highlight base of modes
|
||||
insert = "Function",
|
||||
pending = "Boolean",
|
||||
visual = "Keyword",
|
||||
command = "String",
|
||||
},
|
||||
base = "Comment", -- highlight of everything in in between components
|
||||
primary = "Normal", -- highlight of primary parts (e.g. filename)
|
||||
secondary = "Comment", -- highlight of secondary parts (e.g. filepath)
|
||||
},
|
||||
icons = {
|
||||
diagnostics = {
|
||||
ERROR = " ",
|
||||
WARN = " ",
|
||||
HINT = " ",
|
||||
INFO = " ",
|
||||
},
|
||||
git = {
|
||||
branch = "",
|
||||
},
|
||||
folder = " ",
|
||||
lines = " ",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- ╭────────────────────────────────────────╮
|
||||
-- │ which key - to know what to press next │
|
||||
|
@ -354,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 7eaeb1e40883a0478d50fd01cc91083f4b079f0e
|
||||
Subproject commit e7f703ecb74d00eeea817b0b677c8715bdc23521
|
Loading…
Add table
Add a link
Reference in a new issue