Zsh und neue waybar hinzugefügt
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
require("core.options")
|
||||
require("core.keymaps")
|
||||
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
require("plugins.neotree"),
|
||||
-- require 'plugins.colortheme',
|
||||
require("plugins.colors.colortheme_catppuccin"),
|
||||
-- require 'plugins.colors.colortheme_tokyo_night',
|
||||
-- require 'plugins.colors.colortheme_gruvbox',
|
||||
-- require 'plugins.colors.colortheme_nord',
|
||||
-- require 'plugins.colors.colortheme_everfrost',
|
||||
require("plugins.docker"),
|
||||
require("plugins.bufferline"),
|
||||
require("plugins.lualine"),
|
||||
require("plugins.treesitter"),
|
||||
require("plugins.telescope"),
|
||||
require("plugins.lsp"),
|
||||
require("plugins.latex"),
|
||||
require("plugins.autocompletion"),
|
||||
require("plugins.autoformatting"),
|
||||
require("plugins.gitsigns"),
|
||||
require("plugins.alpha"),
|
||||
require("plugins.indent-backline"),
|
||||
require("plugins.misc"),
|
||||
-- require("plugins.chatGPT"),
|
||||
-- require("plugins.copilot"),
|
||||
require("plugins.lazygit"),
|
||||
require("plugins.harpoon"),
|
||||
require("plugins.comment"),
|
||||
require("plugins.debug"),
|
||||
require("plugins.none-ls"),
|
||||
require("plugins.dap-ui"),
|
||||
require("plugins.flutter.dart-syntax"),
|
||||
require("plugins.flutter.flutter-tools"),
|
||||
require("plugins.nvim-jdtls"),
|
||||
})
|
||||
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"CopilotChat.nvim": { "branch": "canary", "commit": "451d365928a994cda3505a84905303f790e28df8" },
|
||||
"LuaSnip": { "branch": "master", "commit": "c1851d5c519611dfc451b6582961b2602e0af89b" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"copilot.vim": { "branch": "release", "commit": "d1e8429bef7f7709586886b0a23a46fbecc685c4" },
|
||||
"dart-vim-plugin": { "branch": "master", "commit": "4bdc04e2540edf90fda2812434c11d19dc04bc8f" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "4e854f3299e21d1c18279add340428a97520fc44" },
|
||||
"flutter-tools.nvim": { "branch": "main", "commit": "d5bb1dc3db78d7ab65dd8c5a6f32a38e383b9cb1" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "39e0d1cd44eafed5f30c372e377ab1cb1781ec9f" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lazydocker.nvim": { "branch": "main", "commit": "3330d1fc32ff2f52652d5abb1f75123ce5549cfc" },
|
||||
"lazygit.nvim": { "branch": "main", "commit": "b9eae3badab982e71abab96d3ee1d258f0c07961" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "15884cee63a8c205334ab13ab1c891cd4d27101a" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "d39a75bbce4b8aad5d627191ea915179c77c100f" },
|
||||
"mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" },
|
||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "4c2cdc69d69fe00c15ae8648f7e954d99e5de3ea" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "75d60a8f928decd8b38897f80849768b7c540a5b" },
|
||||
"mason.nvim": { "branch": "main", "commit": "888d6ee499d8089a3a4be4309d239d6be1c1e6c0" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" },
|
||||
"none-ls-extras.nvim": { "branch": "main", "commit": "924fe88a9983c7d90dbb31fc4e3129a583ea0a90" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "a5954f00ee88bcdf154e931198ec636a26a1077c" },
|
||||
"nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" },
|
||||
"nvim": { "branch": "main", "commit": "1bf070129c0b6f77cc23f6a2212dcdc868308c52" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||
"nvim-dap": { "branch": "master", "commit": "8df427aeba0a06c6577dc3ab82de3076964e3b8d" },
|
||||
"nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" },
|
||||
"nvim-dap-python": { "branch": "master", "commit": "261ce649d05bc455a29f9636dc03f8cdaa7e0e2c" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "73a26abf4941aa27da59820fd6b028ebcdbcf932" },
|
||||
"nvim-jdtls": { "branch": "master", "commit": "c23f200fee469a415c77265ca55b496feb646992" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "ac1dfbe3b60e5e23a2cff90e3bd6a3bc88031a57" },
|
||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "066fd6505377e3fd4aa219e61ce94c2b8bdb0b79" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "b0debd5c424969b4baeabdc8f54db3036c691732" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
|
||||
"nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" },
|
||||
"vim-bbye": { "branch": "master", "commit": "25ef93ac5a87526111f43e5110675032dbcacf56" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" },
|
||||
"vim-rhubarb": { "branch": "master", "commit": "386daa2e9d98e23e27ad089afcbe5c5a903e488d" },
|
||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "33afa80db65113561dc53fa732b7f5e53d5ecfd0" },
|
||||
"vimtex": { "branch": "master", "commit": "9d9f74c3ab073b70bc943279af1aa86075de632c" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
local function blend_colors(fg, bg, alpha)
|
||||
-- fg, bg are hex colors as strings (e.g., "#a1112a")
|
||||
-- alpha is a value between 0 (fully transparent) and 1 (fully opaque)
|
||||
local function hex_to_rgb(hex)
|
||||
return tonumber(hex:sub(2, 3), 16), tonumber(hex:sub(4, 5), 16), tonumber(hex:sub(6, 7), 16)
|
||||
end
|
||||
|
||||
local function rgb_to_hex(r, g, b)
|
||||
return string.format("#%02x%02x%02x", r, g, b)
|
||||
end
|
||||
|
||||
local r1, g1, b1 = hex_to_rgb(fg)
|
||||
local r2, g2, b2 = hex_to_rgb(bg)
|
||||
|
||||
local r = math.floor(r1 * alpha + r2 * (1 - alpha))
|
||||
local g = math.floor(g1 * alpha + g2 * (1 - alpha))
|
||||
local b = math.floor(b1 * alpha + b2 * (1 - alpha))
|
||||
|
||||
return rgb_to_hex(r, g, b)
|
||||
end
|
||||
|
||||
return {
|
||||
blend_colors = blend_colors,
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
-- Keymaps for better default experience
|
||||
|
||||
-- Set leader key
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = ' '
|
||||
|
||||
-- For conciseness
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
-- Disable the spacebar key's default behavior in Normal and Visual modes
|
||||
vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
|
||||
|
||||
-- Allow moving the cursor through wrapped lines with j, k
|
||||
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||
|
||||
-- clear highlights
|
||||
vim.keymap.set('n', '<Esc>', ':noh<CR>', opts)
|
||||
|
||||
-- save file
|
||||
vim.keymap.set('n', '<C-s>', '<cmd> w <CR>', opts)
|
||||
|
||||
-- save file without auto-formatting
|
||||
vim.keymap.set('n', '<leader>sn', '<cmd>noautocmd w <CR>', opts)
|
||||
|
||||
-- quit file
|
||||
vim.keymap.set('n', '<C-q>', '<cmd> q <CR>', opts)
|
||||
|
||||
-- delete single character without copying into register
|
||||
vim.keymap.set('n', 'x', '"_x', opts)
|
||||
|
||||
-- Vertical scroll and center
|
||||
vim.keymap.set('n', '<C-d>', '<C-d>zz', opts)
|
||||
vim.keymap.set('n', '<C-u>', '<C-u>zz', opts)
|
||||
|
||||
-- Find and center
|
||||
vim.keymap.set('n', 'n', 'nzzzv')
|
||||
vim.keymap.set('n', 'N', 'Nzzzv')
|
||||
|
||||
-- Resize with arrows
|
||||
vim.keymap.set('n', '<Up>', ':resize -2<CR>', opts)
|
||||
vim.keymap.set('n', '<Down>', ':resize +2<CR>', opts)
|
||||
vim.keymap.set('n', '<Left>', ':vertical resize -2<CR>', opts)
|
||||
vim.keymap.set('n', '<Right>', ':vertical resize +2<CR>', opts)
|
||||
|
||||
-- Buffers
|
||||
vim.keymap.set('n', '<Tab>', ':bnext<CR>', opts)
|
||||
vim.keymap.set('n', '<S-Tab>', ':bprevious<CR>', opts)
|
||||
vim.keymap.set('n', '<leader>x', ':Bdelete!<CR>', opts) -- close buffer
|
||||
vim.keymap.set('n', '<leader>b', '<cmd> enew <CR>', opts) -- new buffer
|
||||
|
||||
-- Increment/decrement numbers
|
||||
vim.keymap.set('n', '<leader>+', '<C-a>', opts) -- increment
|
||||
vim.keymap.set('n', '<leader>-', '<C-x>', opts) -- decrement
|
||||
|
||||
-- Window management
|
||||
vim.keymap.set('n', '<leader>v', '<C-w>v', opts) -- split window vertically
|
||||
vim.keymap.set('n', '<leader>h', '<C-w>s', opts) -- split window horizontally
|
||||
vim.keymap.set('n', '<leader>se', '<C-w>=', opts) -- make split windows equal width & height
|
||||
vim.keymap.set('n', '<leader>xs', ':close<CR>', opts) -- close current split window
|
||||
|
||||
-- Navigate between splits
|
||||
vim.keymap.set('n', '<C-k>', ':wincmd k<CR>', opts)
|
||||
vim.keymap.set('n', '<C-j>', ':wincmd j<CR>', opts)
|
||||
vim.keymap.set('n', '<C-h>', ':wincmd h<CR>', opts)
|
||||
vim.keymap.set('n', '<C-l>', ':wincmd l<CR>', opts)
|
||||
|
||||
-- Tabs
|
||||
vim.keymap.set('n', '<leader>to', ':tabnew<CR>', opts) -- open new tab
|
||||
vim.keymap.set('n', '<leader>tx', ':tabclose<CR>', opts) -- close current tab
|
||||
vim.keymap.set('n', '<leader>tn', ':tabn<CR>', opts) -- go to next tab
|
||||
vim.keymap.set('n', '<leader>tp', ':tabp<CR>', opts) -- go to previous tab
|
||||
|
||||
-- Toggle line wrapping
|
||||
vim.keymap.set('n', '<leader>lw', '<cmd>set wrap!<CR>', opts)
|
||||
|
||||
-- Press jk fast to exit insert mode
|
||||
vim.keymap.set('i', 'jk', '<ESC>', opts)
|
||||
vim.keymap.set('i', 'kj', '<ESC>', opts)
|
||||
|
||||
-- Stay in indent mode
|
||||
vim.keymap.set('v', '<', '<gv', opts)
|
||||
vim.keymap.set('v', '>', '>gv', opts)
|
||||
|
||||
-- Move text up and down
|
||||
vim.keymap.set('v', '<A-j>', ':m .+1<CR>==', opts)
|
||||
vim.keymap.set('v', '<A-k>', ':m .-2<CR>==', opts)
|
||||
|
||||
-- Keep last yanked when pasting
|
||||
vim.keymap.set('v', 'p', '"_dP', opts)
|
||||
|
||||
-- Replace word under cursor
|
||||
vim.keymap.set('n', '<leader>j', '*``cgn', opts)
|
||||
|
||||
-- Explicitly yank to system clipboard (highlighted and entire row)
|
||||
vim.keymap.set({ 'n', 'v' }, '<leader>y', [["+y]])
|
||||
vim.keymap.set('n', '<leader>Y', [["+Y]])
|
||||
|
||||
-- Toggle diagnostics
|
||||
local diagnostics_active = true
|
||||
|
||||
vim.keymap.set('n', '<leader>do', function()
|
||||
diagnostics_active = not diagnostics_active
|
||||
|
||||
if diagnostics_active then
|
||||
vim.diagnostic.enable(0)
|
||||
else
|
||||
vim.diagnostic.disable(0)
|
||||
end
|
||||
end)
|
||||
|
||||
-- Diagnostic keymaps
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' })
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' })
|
||||
vim.keymap.set('n', '<leader>d', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
|
||||
|
||||
-- Save and load session
|
||||
vim.keymap.set('n', '<leader>ss', ':mksession! .session.vim<CR>', { noremap = true, silent = false })
|
||||
vim.keymap.set('n', '<leader>sl', ':source .session.vim<CR>', { noremap = true, silent = false })
|
||||
@@ -1,46 +0,0 @@
|
||||
vim.o.shell = "/bin/bash" -- Set default shell to bash
|
||||
vim.o.hlsearch = false -- Set highlight on search
|
||||
vim.wo.number = true -- Make line numbers default
|
||||
vim.o.mouse = "a" -- Enable mouse mode
|
||||
vim.o.clipboard = "unnamedplus" -- Sync clipboard between OS and Neovim.
|
||||
vim.o.breakindent = true -- Enable break indent
|
||||
vim.o.undofile = true -- Save undo history
|
||||
vim.o.ignorecase = true -- Case-insensitive searching UNLESS \C or capital in search
|
||||
vim.o.smartcase = true -- smart case
|
||||
vim.wo.signcolumn = "yes" -- Keep signcolumn on by default
|
||||
vim.o.updatetime = 250 -- Decrease update time
|
||||
vim.o.timeoutlen = 300 -- time to wait for a mapped sequence to complete (in milliseconds)
|
||||
vim.o.backup = false -- creates a backup file
|
||||
vim.o.writebackup = false -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited
|
||||
vim.o.completeopt = "menuone,noselect" -- Set completeopt to have a better completion experience
|
||||
vim.opt.termguicolors = true
|
||||
vim.o.termguicolors = true -- set termguicolors to enable highlight groups
|
||||
vim.o.whichwrap = "bs<>[]hl" -- which "horizontal" keys are allowed to travel to prev/next line
|
||||
vim.o.wrap = false -- display lines as one long line
|
||||
vim.o.linebreak = true -- companion to wrap don't split words
|
||||
vim.o.scrolloff = 4 -- minimal number of screen lines to keep above and below the cursor
|
||||
vim.o.sidescrolloff = 8 -- minimal number of screen columns either side of cursor if wrap is `false`
|
||||
vim.o.relativenumber = true -- set relative numbered lines
|
||||
vim.o.numberwidth = 2 -- set number column width to 2 {default 4}
|
||||
vim.o.shiftwidth = 2 -- the number of spaces inserted for each indentation
|
||||
vim.o.tabstop = 2 -- insert n spaces for a tab
|
||||
vim.o.softtabstop = 2 -- Number of spaces that a tab counts for while performing editing operations
|
||||
vim.o.expandtab = true -- convert tabs to spaces
|
||||
vim.o.cursorline = false -- highlight the current line
|
||||
vim.o.splitbelow = true -- force all horizontal splits to go below current window
|
||||
vim.o.splitright = true -- force all vertical splits to go to the right of current window
|
||||
vim.o.swapfile = false -- creates a swapfile
|
||||
vim.o.smartindent = true -- make indenting smarter again
|
||||
vim.o.showmode = false -- we don't need to see things like -- INSERT -- anymore
|
||||
vim.o.showtabline = 2 -- always show tabs
|
||||
vim.o.backspace = "indent,eol,start" -- allow backspace on
|
||||
vim.o.pumheight = 10 -- pop up menu height
|
||||
vim.o.conceallevel = 0 -- so that `` is visible in markdown files
|
||||
vim.o.fileencoding = "utf-8" -- the encoding written to a file
|
||||
vim.o.cmdheight = 1 -- more space in the neovim command line for displaying messages
|
||||
vim.o.autoindent = true -- copy indent from current line when starting new one
|
||||
vim.opt.shortmess:append("c") -- don't give |ins-completion-menu| messages
|
||||
vim.opt.iskeyword:append("-") -- hyphenated words recognized by searches
|
||||
vim.opt.formatoptions:remove({ "c", "r", "o" }) -- don't insert the current comment leader automatically for auto-wrapping comments using 'textwidth', hitting <Enter> in insert mode, or hitting 'o' or 'O' in normal mode.
|
||||
vim.opt.runtimepath:remove("/usr/share/vim/vimfiles") -- separate vim plugins from neovim in case vim still in use
|
||||
vim.opt.termguicolors = true -- True color support
|
||||
@@ -1,24 +0,0 @@
|
||||
return {
|
||||
"goolord/alpha-nvim",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
|
||||
config = function()
|
||||
local alpha = require("alpha")
|
||||
local dashboard = require("alpha.themes.startify")
|
||||
|
||||
dashboard.section.header.val = {
|
||||
[[ ]],
|
||||
[[ ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ]],
|
||||
[[ ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ]],
|
||||
[[ ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ]],
|
||||
[[ ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ]],
|
||||
[[ ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ]],
|
||||
[[ ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ]],
|
||||
[[ ]],
|
||||
}
|
||||
|
||||
alpha.setup(dashboard.opts)
|
||||
end,
|
||||
}
|
||||
@@ -1,143 +0,0 @@
|
||||
return { -- Autocompletion
|
||||
"hrsh7th/nvim-cmp",
|
||||
-- event = 'InsertEnter',
|
||||
dependencies = {
|
||||
-- Snippet Engine & its associated nvim-cmp source
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
build = (function()
|
||||
-- Build Step is needed for regex support in snippets
|
||||
-- This step is not supported in many windows environments
|
||||
-- Remove the below condition to re-enable on windows
|
||||
if vim.fn.has("win32") == 1 or vim.fn.executable("make") == 0 then
|
||||
return
|
||||
end
|
||||
return "make install_jsregexp"
|
||||
end)(),
|
||||
},
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
|
||||
-- Adds other completion capabilities.
|
||||
-- nvim-cmp does not ship with all sources by default. They are split
|
||||
-- into multiple repos for maintenance purposes.
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
|
||||
-- Adds a number of user-friendly snippets
|
||||
"rafamadriz/friendly-snippets",
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
local luasnip = require("luasnip")
|
||||
luasnip.config.setup({})
|
||||
|
||||
local kind_icons = {
|
||||
Text = "",
|
||||
Method = "m",
|
||||
Function = "",
|
||||
Constructor = "",
|
||||
Field = "",
|
||||
Variable = "",
|
||||
Class = "",
|
||||
Interface = "",
|
||||
Module = "",
|
||||
Property = "",
|
||||
Unit = "",
|
||||
Value = "",
|
||||
Enum = "",
|
||||
Keyword = "",
|
||||
Snippet = "",
|
||||
Color = "",
|
||||
File = "",
|
||||
Reference = "",
|
||||
Folder = "",
|
||||
EnumMember = "",
|
||||
Constant = "",
|
||||
Struct = "",
|
||||
Event = "",
|
||||
Operator = "",
|
||||
TypeParameter = "",
|
||||
}
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
completion = { completeopt = "menu,menuone,noinsert" },
|
||||
-- window = {
|
||||
-- completion = cmp.config.window.bordered(),
|
||||
-- documentation = cmp.config.window.bordered(),
|
||||
-- },
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-j>"] = cmp.mapping.select_next_item(), -- Select the [n]ext item
|
||||
["<C-k>"] = cmp.mapping.select_prev_item(), -- Select the [p]revious item
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept the completion with Enter.
|
||||
["<C-c>"] = cmp.mapping.complete({}), -- Manually trigger a completion from nvim-cmp.
|
||||
|
||||
-- Think of <c-l> as moving to the right of your snippet expansion.
|
||||
-- So if you have a snippet that's like:
|
||||
-- function $name($args)
|
||||
-- $body
|
||||
-- end
|
||||
--
|
||||
-- <c-l> will move you to the right of each of the expansion locations.
|
||||
-- <c-h> is similar, except moving you backwards.
|
||||
["<C-l>"] = cmp.mapping(function()
|
||||
if luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<C-h>"] = cmp.mapping(function()
|
||||
if luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
-- Select next/previous item with Control + Tab / Shift + Tab
|
||||
["<C-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
},
|
||||
formatting = {
|
||||
fields = { "kind", "abbr", "menu" },
|
||||
format = function(entry, vim_item)
|
||||
-- Kind icons
|
||||
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
|
||||
-- vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind) -- This concatonates the icons with the name of the item kind
|
||||
vim_item.menu = ({
|
||||
nvim_lsp = "[LSP]",
|
||||
luasnip = "[Snippet]",
|
||||
buffer = "[Buffer]",
|
||||
path = "[Path]",
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
-- Format on save and linters
|
||||
return {
|
||||
'nvimtools/none-ls.nvim',
|
||||
dependencies = {
|
||||
'nvimtools/none-ls-extras.nvim',
|
||||
'jayp0521/mason-null-ls.nvim', -- ensure dependencies are installed
|
||||
},
|
||||
config = function()
|
||||
local null_ls = require 'null-ls'
|
||||
local formatting = null_ls.builtins.formatting -- to setup formatters
|
||||
local diagnostics = null_ls.builtins.diagnostics -- to setup linters
|
||||
|
||||
-- list of formatters & linters for mason to install
|
||||
require('mason-null-ls').setup {
|
||||
ensure_installed = {
|
||||
'checkmake',
|
||||
'prettier', -- ts/js formatter
|
||||
'stylua', -- lua formatter
|
||||
'eslint_d', -- ts/js linter
|
||||
'shfmt',
|
||||
'ruff',
|
||||
},
|
||||
-- auto-install configured formatters & linters (with null-ls)
|
||||
automatic_installation = true,
|
||||
}
|
||||
|
||||
local sources = {
|
||||
diagnostics.checkmake,
|
||||
formatting.prettier.with { filetypes = { 'html', 'json', 'yaml', 'markdown' } },
|
||||
formatting.stylua,
|
||||
formatting.shfmt.with { args = { '-i', '4' } },
|
||||
formatting.terraform_fmt,
|
||||
require('none-ls.formatting.ruff').with { extra_args = { '--extend-select', 'I' } },
|
||||
require 'none-ls.formatting.ruff_format',
|
||||
}
|
||||
|
||||
local augroup = vim.api.nvim_create_augroup('LspFormatting', {})
|
||||
null_ls.setup {
|
||||
-- debug = true, -- Enable debug mode. Inspect logs with :NullLsLog.
|
||||
sources = sources,
|
||||
-- you can reuse a shared lspconfig on_attach callback here
|
||||
on_attach = function(client, bufnr)
|
||||
if client.supports_method 'textDocument/formatting' then
|
||||
vim.api.nvim_clear_autocmds { group = augroup, buffer = bufnr }
|
||||
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||
group = augroup,
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
vim.lsp.buf.format { async = false }
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
}
|
||||
end,
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
return {
|
||||
'akinsho/bufferline.nvim',
|
||||
dependencies = {
|
||||
'moll/vim-bbye',
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
},
|
||||
config = function()
|
||||
-- vim.opt.linespace = 8
|
||||
|
||||
require('bufferline').setup {
|
||||
options = {
|
||||
mode = 'buffers', -- set to "tabs" to only show tabpages instead
|
||||
themable = true, -- allows highlight groups to be overriden i.e. sets highlights as default
|
||||
numbers = 'none', -- | "ordinal" | "buffer_id" | "both" | function({ ordinal, id, lower, raise }): string,
|
||||
close_command = 'Bdelete! %d', -- can be a string | function, see "Mouse actions"
|
||||
right_mouse_command = 'Bdelete! %d', -- can be a string | function, see "Mouse actions"
|
||||
left_mouse_command = 'buffer %d', -- can be a string | function, see "Mouse actions"
|
||||
middle_mouse_command = nil, -- can be a string | function, see "Mouse actions"
|
||||
-- buffer_close_icon = '',
|
||||
buffer_close_icon = '✗',
|
||||
-- buffer_close_icon = '✕',
|
||||
close_icon = '',
|
||||
path_components = 1, -- Show only the file name without the directory
|
||||
modified_icon = '●',
|
||||
left_trunc_marker = '',
|
||||
right_trunc_marker = '',
|
||||
max_name_length = 30,
|
||||
max_prefix_length = 30, -- prefix used when a buffer is de-duplicated
|
||||
tab_size = 21,
|
||||
diagnostics = false,
|
||||
diagnostics_update_in_insert = false,
|
||||
color_icons = true,
|
||||
show_buffer_icons = true,
|
||||
show_buffer_close_icons = true,
|
||||
show_close_icon = true,
|
||||
persist_buffer_sort = true, -- whether or not custom sorted buffers should persist
|
||||
separator_style = { "|", "|" }, -- Left slope and right slope
|
||||
enforce_regular_tabs = true,
|
||||
always_show_bufferline = true,
|
||||
show_tab_indicators = false,
|
||||
indicator = {
|
||||
-- icon = '▎', -- this should be omitted if indicator style is not 'icon'
|
||||
style = 'none', -- Options: 'icon', 'underline', 'none'
|
||||
},
|
||||
icon_pinned = '',
|
||||
minimum_padding = 1,
|
||||
maximum_padding = 5,
|
||||
maximum_length = 15,
|
||||
sort_by = 'insert_at_end',
|
||||
},
|
||||
highlights = {
|
||||
separator = {
|
||||
fg = '#434C5E',
|
||||
},
|
||||
buffer_selected = {
|
||||
bold = true,
|
||||
italic = false,
|
||||
},
|
||||
-- separator_selected = {},
|
||||
-- tab_selected = {},
|
||||
-- background = {},
|
||||
-- indicator_selected = {},
|
||||
-- fill = {},
|
||||
},
|
||||
}
|
||||
|
||||
-- Keymaps
|
||||
local opts = { noremap = true, silent = true, desc = 'Go to Buffer' }
|
||||
-- vim.keymap.set("n", "<Tab>", "<Cmd>BufferLineCycleNext<CR>", {})
|
||||
-- vim.keymap.set("n", "<S-Tab>", "<Cmd>BufferLineCyclePrev<CR>", {})
|
||||
-- vim.keymap.set('n', '<leader>1', "<cmd>lua require('bufferline').go_to_buffer(1)<CR>", opts)
|
||||
-- vim.keymap.set('n', '<leader>2', "<cmd>lua require('bufferline').go_to_buffer(2)<CR>", opts)
|
||||
-- vim.keymap.set('n', '<leader>3', "<cmd>lua require('bufferline').go_to_buffer(3)<CR>", opts)
|
||||
-- vim.keymap.set('n', '<leader>4', "<cmd>lua require('bufferline').go_to_buffer(4)<CR>", opts)
|
||||
-- vim.keymap.set('n', '<leader>5', "<cmd>lua require('bufferline').go_to_buffer(5)<CR>", opts)
|
||||
-- vim.keymap.set('n', '<leader>6', "<cmd>lua require('bufferline').go_to_buffer(6)<CR>", opts)
|
||||
-- vim.keymap.set('n', '<leader>7', "<cmd>lua require('bufferline').go_to_buffer(7)<CR>", opts)
|
||||
-- vim.keymap.set('n', '<leader>8', "<cmd>lua require('bufferline').go_to_buffer(8)<CR>", opts)
|
||||
-- vim.keymap.set('n', '<leader>9', "<cmd>lua require('bufferline').go_to_buffer(9)<CR>", opts)
|
||||
end,
|
||||
}
|
||||
@@ -1,159 +0,0 @@
|
||||
return {
|
||||
"jackMort/ChatGPT.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
vim.api.nvim_set_hl(0, "ChatGPTNormalFloat", { bg = "NONE", fg = "NONE" })
|
||||
vim.api.nvim_set_hl(0, "ChatGPTFloatBorder", { bg = "NONE", fg = "NONE" })
|
||||
require("chatgpt").setup({
|
||||
|
||||
api_key_cmd = "gpg --decrypt " .. vim.fn.expand("$HOME") .. "/Dokumente/secret.txt.gpg",
|
||||
yank_register = "+",
|
||||
edit_with_instructions = {
|
||||
diff = false,
|
||||
keymaps = {
|
||||
close = "<C-c>",
|
||||
accept = "<C-y>",
|
||||
toggle_diff = "<C-d>",
|
||||
toggle_settings = "<C-o>",
|
||||
cycle_windows = "<Tab>",
|
||||
use_output_as_input = "<C-i>",
|
||||
},
|
||||
},
|
||||
chat = {
|
||||
loading_text = "Loading, please wait ...",
|
||||
question_sign = "", -- 🙂
|
||||
-- answer_sign = 'ﮧ', -- 🤖
|
||||
answer_sign = "🤖",
|
||||
max_line_length = 120,
|
||||
sessions_window = {
|
||||
border = {
|
||||
style = "rounded",
|
||||
text = {
|
||||
top = " Sessions ",
|
||||
},
|
||||
},
|
||||
win_options = {
|
||||
winhighlight = "Normal:ChatGPTNormalFloat,FloatBorder:ChatGPTFloatBorder",
|
||||
},
|
||||
},
|
||||
},
|
||||
keymaps = {
|
||||
close = { "<C-c>" },
|
||||
yank_last = "<C-y>",
|
||||
yank_last_code = "<C-k>",
|
||||
scroll_up = "<C-u>",
|
||||
scroll_down = "<C-d>",
|
||||
new_session = "<C-n>",
|
||||
cycle_windows = "<Tab>",
|
||||
cycle_modes = "<C-f>",
|
||||
next_message = "<C-j>",
|
||||
prev_message = "<C-k>",
|
||||
select_session = "<Space>",
|
||||
rename_session = "r",
|
||||
delete_session = "d",
|
||||
draft_message = "<C-d>",
|
||||
edit_message = "e",
|
||||
delete_message = "d",
|
||||
toggle_settings = "<C-o>",
|
||||
toggle_message_role = "<C-r>",
|
||||
toggle_system_role_open = "<C-s>",
|
||||
stop_generating = "<C-x>",
|
||||
},
|
||||
popup_layout = {
|
||||
default = "center",
|
||||
center = {
|
||||
width = "60%",
|
||||
height = "80%",
|
||||
},
|
||||
right = {
|
||||
width = "30%",
|
||||
width_settings_open = "50%",
|
||||
},
|
||||
},
|
||||
popup_window = {
|
||||
border = {
|
||||
highlight = "Normal:ChatGPTNormalFloat,FloatBorder:ChatGPTFloatBorder",
|
||||
style = "rounded",
|
||||
text = {
|
||||
top = " ChatGPT ",
|
||||
},
|
||||
},
|
||||
win_options = {
|
||||
wrap = true,
|
||||
linebreak = true,
|
||||
foldcolumn = "1",
|
||||
winhighlight = "Normal:ChatGPTNormalFloat,FloatBorder:ChatGPTFloatBorder",
|
||||
},
|
||||
buf_options = {
|
||||
filetype = "markdown",
|
||||
},
|
||||
},
|
||||
system_window = {
|
||||
border = {
|
||||
highlight = "Normal:ChatGPTNormalFloat,FloatBorder:ChatGPTFloatBorder",
|
||||
style = "rounded",
|
||||
text = {
|
||||
top = " SYSTEM ",
|
||||
},
|
||||
},
|
||||
win_options = {
|
||||
wrap = true,
|
||||
linebreak = true,
|
||||
foldcolumn = "2",
|
||||
winhighlight = "Normal:ChatGPTNormalFloat,FloatBorder:ChatGPTFloatBorder",
|
||||
},
|
||||
},
|
||||
popup_input = {
|
||||
prompt = " ",
|
||||
border = {
|
||||
highlight = "Normal:ChatGPTNormalFloat,FloatBorder:ChatGPTFloatBorder",
|
||||
style = "rounded",
|
||||
text = {
|
||||
top_align = "center",
|
||||
top = " Prompt ",
|
||||
},
|
||||
},
|
||||
win_options = {
|
||||
winhighlight = "Normal:ChatGPTNormalFloat,FloatBorder:ChatGPTFloatBorder",
|
||||
},
|
||||
submit = "<C-Enter>",
|
||||
submit_n = "<Enter>",
|
||||
max_visible_lines = 20,
|
||||
},
|
||||
settings_window = {
|
||||
border = {
|
||||
style = "rounded",
|
||||
text = {
|
||||
top = " Settings ",
|
||||
},
|
||||
},
|
||||
win_options = {
|
||||
winhighlight = "Normal:ChatGPTNormalFloat,FloatBorder:ChatGPTFloatBorder",
|
||||
},
|
||||
},
|
||||
-- this config assumes you have OPENAI_API_KEY environment variable set
|
||||
openai_params = {
|
||||
model = "gpt-4o-mini",
|
||||
frequency_penalty = 0,
|
||||
presence_penalty = 0,
|
||||
max_tokens = 4095,
|
||||
temperature = 0.2,
|
||||
top_p = 0.1,
|
||||
n = 1,
|
||||
},
|
||||
openai_edit_params = {
|
||||
model = "gpt-3.5-turbo",
|
||||
frequency_penalty = 0,
|
||||
presence_penalty = 0,
|
||||
temperature = 0,
|
||||
top_p = 1,
|
||||
n = 1,
|
||||
},
|
||||
})
|
||||
end,
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
return {
|
||||
'catppuccin/nvim',
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
-- Setup Catppuccin with desired options
|
||||
require('catppuccin').setup({
|
||||
flavour = 'mocha', -- Options: 'latte', 'frappe', 'macchiato', 'mocha'
|
||||
transparent_background = true, -- Enable transparency
|
||||
term_colors = true, -- Use terminal colors
|
||||
})
|
||||
|
||||
-- Load the colorscheme
|
||||
vim.cmd('colorscheme catppuccin')
|
||||
|
||||
-- Toggle background transparency
|
||||
local bg_transparency = true
|
||||
|
||||
local toggle_transparency = function()
|
||||
bg_transparency = not bg_transparency
|
||||
-- Manually set transparency
|
||||
if bg_transparency then
|
||||
require('catppuccin').setup({ transparent_background = true })
|
||||
else
|
||||
require('catppuccin').setup({ transparent_background = false })
|
||||
end
|
||||
vim.cmd('colorscheme catppuccin')
|
||||
end
|
||||
|
||||
vim.keymap.set('n', '<leader>bg', toggle_transparency, { noremap = true, silent = true })
|
||||
end
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
return {
|
||||
'sainnhe/everforest',
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
-- Example config for Everforest
|
||||
vim.g.everforest_background = 'soft' -- Options: 'hard', 'medium', 'soft'
|
||||
vim.g.everforest_transparent_background = true -- Enable transparency
|
||||
vim.g.everforest_better_performance = 1 -- Better performance settings
|
||||
|
||||
-- Load the colorscheme
|
||||
vim.cmd('colorscheme everforest')
|
||||
|
||||
-- Toggle background transparency
|
||||
local bg_transparency = true
|
||||
|
||||
local toggle_transparency = function()
|
||||
bg_transparency = not bg_transparency
|
||||
vim.g.everforest_transparent_background = bg_transparency
|
||||
vim.cmd('colorscheme everforest')
|
||||
end
|
||||
|
||||
vim.keymap.set('n', '<leader>bg', toggle_transparency, { noremap = true, silent = true })
|
||||
end
|
||||
}
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
return {
|
||||
'morhetz/gruvbox',
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
-- Example config for Gruvbox
|
||||
vim.g.gruvbox_contrast_dark = 'medium' -- Options: 'soft', 'medium', 'hard'
|
||||
vim.g.gruvbox_transparent_bg = true -- Enable transparency
|
||||
|
||||
-- Load the colorscheme
|
||||
vim.cmd('colorscheme gruvbox')
|
||||
|
||||
-- Toggle background transparency
|
||||
local bg_transparency = true
|
||||
|
||||
local toggle_transparency = function()
|
||||
bg_transparency = not bg_transparency
|
||||
vim.g.gruvbox_transparent_bg = bg_transparency
|
||||
vim.cmd('colorscheme gruvbox')
|
||||
end
|
||||
|
||||
vim.keymap.set('n', '<leader>bg', toggle_transparency, { noremap = true, silent = true })
|
||||
end
|
||||
}
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
return {
|
||||
'shaunsingh/nord.nvim',
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
-- Example config in lua
|
||||
vim.g.nord_contrast = true
|
||||
vim.g.nord_borders = false
|
||||
vim.g.nord_disable_background = true
|
||||
vim.g.nord_italic = false
|
||||
vim.g.nord_uniform_diff_background = true
|
||||
vim.g.nord_bold = false
|
||||
|
||||
-- Load the colorscheme
|
||||
require('nord').set()
|
||||
|
||||
-- Toggle background transparency
|
||||
local bg_transparency = true
|
||||
|
||||
local toggle_transparency = function()
|
||||
bg_transparency = not bg_transparency
|
||||
vim.g.nord_disable_background = bg_transparency
|
||||
vim.cmd('colorscheme nord')
|
||||
end
|
||||
|
||||
vim.keymap.set('n', '<leader>bg', toggle_transparency, { noremap = true, silent = true })
|
||||
end
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
return {
|
||||
'folke/tokyonight.nvim',
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
-- Example config for Tokyo Night
|
||||
vim.g.tokyonight_style = 'night' -- Options: 'night', 'day'
|
||||
vim.g.tokyonight_transparent = true -- Enable transparency
|
||||
|
||||
-- Load the colorscheme
|
||||
vim.cmd('colorscheme tokyonight')
|
||||
|
||||
-- Toggle background transparency
|
||||
local bg_transparency = true
|
||||
|
||||
local toggle_transparency = function()
|
||||
bg_transparency = not bg_transparency
|
||||
vim.g.tokyonight_transparent = bg_transparency
|
||||
vim.cmd('colorscheme tokyonight')
|
||||
end
|
||||
|
||||
vim.keymap.set('n', '<leader>bg', toggle_transparency, { noremap = true, silent = true })
|
||||
end
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
-- Easily comment visual regions/lines
|
||||
return {
|
||||
"numToStr/Comment.nvim",
|
||||
opts = {},
|
||||
config = function()
|
||||
local opts = { noremap = true, silent = true }
|
||||
vim.keymap.set("n", "<C-_>", require("Comment.api").toggle.linewise.current, opts)
|
||||
vim.keymap.set("n", "<C-c>", require("Comment.api").toggle.linewise.current, opts)
|
||||
vim.keymap.set("n", "<C-/>", require("Comment.api").toggle.linewise.current, opts)
|
||||
vim.keymap.set(
|
||||
"v",
|
||||
"<C-_>",
|
||||
"<ESC><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>",
|
||||
opts
|
||||
)
|
||||
vim.keymap.set(
|
||||
"v",
|
||||
"<C-c>",
|
||||
"<ESC><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>",
|
||||
opts
|
||||
)
|
||||
vim.keymap.set(
|
||||
"v",
|
||||
"<C-/>",
|
||||
"<ESC><cmd>lua require('Comment.api').toggle.linewise(vim.fn.visualmode())<cr>",
|
||||
opts
|
||||
)
|
||||
end,
|
||||
}
|
||||
@@ -1,130 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"CopilotC-Nvim/CopilotChat.nvim",
|
||||
branch = "canary",
|
||||
dependencies = {
|
||||
{ "github/copilot.vim" },
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
build = "make tiktoken",
|
||||
opts = function()
|
||||
local copilot_select = require("CopilotChat.select") -- Importiere hier
|
||||
|
||||
return {
|
||||
debug = true,
|
||||
system_prompt = "You are an AI coding assistant called Copilot.",
|
||||
model = "gpt-4o",
|
||||
temperature = 0.1,
|
||||
|
||||
question_header = "## User ",
|
||||
answer_header = "## Copilot ",
|
||||
error_header = "## Error ",
|
||||
separator = "───",
|
||||
|
||||
show_folds = true,
|
||||
show_help = true,
|
||||
auto_follow_cursor = true,
|
||||
auto_insert_mode = false,
|
||||
insert_at_end = false,
|
||||
clear_chat_on_new_prompt = false,
|
||||
highlight_selection = true,
|
||||
|
||||
context = nil,
|
||||
history_path = vim.fn.stdpath("data") .. "/copilotchat_history",
|
||||
callback = nil,
|
||||
|
||||
-- Default selection (visual or line)
|
||||
selection = function(source)
|
||||
return copilot_select.visual(source) or copilot_select.line(source)
|
||||
end,
|
||||
|
||||
-- Default prompts
|
||||
prompts = {
|
||||
Explain = {
|
||||
prompt = "/COPILOT_EXPLAIN Write an explanation for the active selection as paragraphs of text.",
|
||||
},
|
||||
Review = {
|
||||
prompt = "/COPILOT_REVIEW Review the selected code.",
|
||||
callback = function(response, source)
|
||||
-- siehe config.lua für die Implementierung
|
||||
end,
|
||||
},
|
||||
Fix = {
|
||||
prompt = "/COPILOT_GENERATE There is a problem in this code. Rewrite the code to show it with the bug fixed.",
|
||||
},
|
||||
Optimize = {
|
||||
prompt = "/COPILOT_GENERATE Optimize the selected code to improve performance and readability.",
|
||||
},
|
||||
Docs = {
|
||||
prompt = "/COPILOT_GENERATE Please add documentation comment for the selection.",
|
||||
},
|
||||
Tests = {
|
||||
prompt = "/COPILOT_GENERATE Please generate tests for my code.",
|
||||
},
|
||||
FixDiagnostic = {
|
||||
prompt = "Please assist with the following diagnostic issue in file:",
|
||||
selection = copilot_select.diagnostics,
|
||||
},
|
||||
Commit = {
|
||||
prompt = "Write commit message for the change with commitizen convention. Make sure the title has maximum 50 characters and message is wrapped at 72 characters. Wrap the whole message in code block with language gitcommit.",
|
||||
selection = copilot_select.gitdiff,
|
||||
},
|
||||
CommitStaged = {
|
||||
prompt = "Write commit message for the change with commitizen convention. Make sure the title has maximum 50 characters and message is wrapped at 72 characters. Wrap the whole message in code block with language gitcommit.",
|
||||
selection = function(source)
|
||||
return copilot_select.gitdiff(source, true)
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- Default window options
|
||||
window = {
|
||||
layout = "vertical",
|
||||
width = 0.5,
|
||||
height = 0.5,
|
||||
relative = "editor",
|
||||
border = "single",
|
||||
title = "Copilot Chat",
|
||||
zindex = 1,
|
||||
},
|
||||
|
||||
-- Default mappings
|
||||
mappings = {
|
||||
complete = {
|
||||
detail = "Use @<Tab> or /<Tab> for options.",
|
||||
insert = "<Tab>",
|
||||
},
|
||||
close = {
|
||||
normal = "q",
|
||||
insert = "<C-c>",
|
||||
},
|
||||
reset = {
|
||||
normal = "<C-l>",
|
||||
insert = "<C-l>",
|
||||
},
|
||||
submit_prompt = {
|
||||
normal = "<CR>",
|
||||
insert = "<C-s>",
|
||||
},
|
||||
accept_diff = {
|
||||
normal = "<C-y>",
|
||||
insert = "<C-y>",
|
||||
},
|
||||
yank_diff = {
|
||||
normal = "gy",
|
||||
register = '"',
|
||||
},
|
||||
show_diff = {
|
||||
normal = "gd",
|
||||
},
|
||||
show_system_prompt = {
|
||||
normal = "gp",
|
||||
},
|
||||
show_user_selection = {
|
||||
normal = "gs",
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,141 +0,0 @@
|
||||
return {
|
||||
"rcarriga/nvim-dap-ui",
|
||||
dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
|
||||
config = function()
|
||||
local dap, dapui = require("dap"), require("dapui")
|
||||
local color_blend = require("color_blend")
|
||||
|
||||
dap.defaults.fallback.external_terminal = {
|
||||
command = "/usr/bin/kitty",
|
||||
args = { "-e" },
|
||||
}
|
||||
|
||||
dap.defaults.fallback.force_external_terminal = true
|
||||
|
||||
dap.adapters.gdb = {
|
||||
type = "executable",
|
||||
command = "gdb",
|
||||
args = {
|
||||
"--interpreter=dap",
|
||||
"--eval-command",
|
||||
"set print pretty on",
|
||||
},
|
||||
}
|
||||
|
||||
-- Define the custom highlight group for the stopped line
|
||||
vim.api.nvim_set_hl(0, "DapCustomHighlight", { bg = "#44475a", fg = "NONE" })
|
||||
|
||||
-- Define the custom highlight group for Breakpoint
|
||||
vim.api.nvim_set_hl(0, "DapCustomBreakpoint", { bg = "NONE", fg = "#ff5555" })
|
||||
|
||||
-- Define the custom highlight group for Breakpoint line
|
||||
vim.api.nvim_set_hl(
|
||||
0,
|
||||
"DapCustomBreakpointLine",
|
||||
{ bg = color_blend.blend_colors("#a1112a", "#000000", 0.5), fg = "NONE" }
|
||||
)
|
||||
|
||||
vim.fn.sign_define("DapBreakpoint", {
|
||||
text = " ", -- nerdfonts icon here
|
||||
texthl = "DapCustomBreakpoint",
|
||||
linehl = "DapCustomBreakpointLine",
|
||||
numhl = "DapBreakpoint",
|
||||
})
|
||||
vim.fn.sign_define("DapStopped", {
|
||||
text = "->", -- nerdfonts icon here TODO:: add a different icon depending on my nerd font
|
||||
texthl = "",
|
||||
linehl = "DapCustomHighlight",
|
||||
numhl = "DapBreakpoint",
|
||||
})
|
||||
|
||||
dap.configurations.c = {
|
||||
{
|
||||
name = "Launch",
|
||||
type = "gdb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
||||
end,
|
||||
cwd = "${workspaceFolder}",
|
||||
stopAtBeginningOfMainSubprogram = false,
|
||||
console = "externalTerminal",
|
||||
},
|
||||
{
|
||||
name = "Select and attach to process",
|
||||
type = "gdb",
|
||||
request = "attach",
|
||||
program = function()
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
||||
end,
|
||||
pid = function()
|
||||
local name = vim.fn.input("Executable name (filter): ")
|
||||
return require("dap.utils").pick_process({ filter = name })
|
||||
end,
|
||||
cwd = "${workspaceFolder}",
|
||||
},
|
||||
{
|
||||
name = "Attach to gdbserver :1234",
|
||||
type = "gdb",
|
||||
request = "attach",
|
||||
target = "localhost:1234",
|
||||
program = function()
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
||||
end,
|
||||
cwd = "${workspaceFolder}",
|
||||
},
|
||||
}
|
||||
|
||||
dap.configurations.cpp = dap.configurations.c
|
||||
|
||||
vim.keymap.set("n", "<Leader>b", function()
|
||||
require("dap").toggle_breakpoint()
|
||||
end, { desc = "DAP-UI: toggle [B]reakpoint" })
|
||||
|
||||
vim.keymap.set("n", "<Leader>ev", function()
|
||||
require("dapui").eval(nil, { enter = true })
|
||||
end, { desc = "DAP-UI: [E][v]aluate line" })
|
||||
|
||||
-- vim.keymap.set("n", "<Leader>df", function()
|
||||
-- local widgets = require("dap.ui.widgets")
|
||||
-- widgets.centered_float(widgets.frames)
|
||||
-- end)
|
||||
|
||||
-- vim.keymap.set("n", "<Leader>dr", function()
|
||||
-- require("dap").repl.open()
|
||||
-- -- Set up autocmd for terminal mode to handle color properly
|
||||
-- vim.cmd([[
|
||||
-- autocmd TermOpen * setlocal nonumber norelativenumber | startinsert
|
||||
-- ]])
|
||||
-- end)
|
||||
|
||||
vim.keymap.set("n", "<F5>", function()
|
||||
require("dap").continue()
|
||||
end, { desc = "DAP-UI: [F5] continue" })
|
||||
vim.keymap.set("n", "<F10>", function()
|
||||
require("dap").step_over()
|
||||
end, { desc = "DAP-UI: [F10] step over" })
|
||||
vim.keymap.set("n", "<F11>", function()
|
||||
require("dap").step_into()
|
||||
end, { desc = "DAP-UI: [F11] step into" })
|
||||
vim.keymap.set("n", "<F12>", function()
|
||||
require("dap").step_out()
|
||||
end, { desc = "DAP-UI: [F12] step out" })
|
||||
|
||||
dap.listeners.before.attach.dapui_config = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.launch.dapui_config = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.event_terminated.dapui_config = function()
|
||||
dapui.close()
|
||||
end
|
||||
dap.listeners.before.event_exited.dapui_config = function()
|
||||
dapui.close()
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<Leader>df", function()
|
||||
require("dapui").toggle()
|
||||
end, { desc = "DAP-UI: Toggle Debug Window" })
|
||||
end,
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
return {
|
||||
"mfussenegger/nvim-dap",
|
||||
dependencies = {
|
||||
-- Creates a beautiful debugger UI
|
||||
"rcarriga/nvim-dap-ui",
|
||||
"nvim-neotest/nvim-nio",
|
||||
|
||||
-- Installs the debug adapters for you
|
||||
"williamboman/mason.nvim",
|
||||
"jay-babu/mason-nvim-dap.nvim",
|
||||
|
||||
-- Add your own debuggers here
|
||||
"leoluz/nvim-dap-go",
|
||||
"mfussenegger/nvim-dap-python",
|
||||
},
|
||||
config = function()
|
||||
local dap = require("dap")
|
||||
local dapui = require("dapui")
|
||||
|
||||
require("mason-nvim-dap").setup({
|
||||
-- Makes a best effort to setup the various debuggers with
|
||||
-- reasonable debug configurations
|
||||
automatic_setup = true,
|
||||
automatic_installation = true,
|
||||
|
||||
-- You can provide additional configuration to the handlers,
|
||||
-- see mason-nvim-dap README for more information
|
||||
handlers = {},
|
||||
|
||||
-- You'll need to check that you have the required things installed
|
||||
-- online, please don't ask me how to install them :)
|
||||
ensure_installed = {
|
||||
-- Update this to ensure that you have the debuggers for the langs you want
|
||||
-- 'delve',
|
||||
"debugpy",
|
||||
},
|
||||
})
|
||||
|
||||
-- Basic debugging keymaps, feel free to change to your liking!
|
||||
vim.keymap.set("n", "<F5>", dap.continue, { desc = "Debug: Start/Continue" })
|
||||
vim.keymap.set("n", "<F1>", dap.step_into, { desc = "Debug: Step Into" })
|
||||
vim.keymap.set("n", "<F2>", dap.step_over, { desc = "Debug: Step Over" })
|
||||
vim.keymap.set("n", "<F3>", dap.step_out, { desc = "Debug: Step Out" })
|
||||
vim.keymap.set("n", "<leader>b", dap.toggle_breakpoint, { desc = "Debug: Toggle Breakpoint" })
|
||||
vim.keymap.set("n", "<leader>B", function()
|
||||
dap.set_breakpoint(vim.fn.input("Breakpoint condition: "))
|
||||
end, { desc = "Debug: Set Breakpoint" })
|
||||
|
||||
-- Dap UI setup
|
||||
-- For more information, see |:help nvim-dap-ui|
|
||||
dapui.setup({
|
||||
-- Set icons to characters that are more likely to work in every terminal.
|
||||
-- Feel free to remove or use ones that you like more! :)
|
||||
-- Don't feel like these are good choices.
|
||||
icons = { expanded = "▾", collapsed = "▸", current_frame = "*" },
|
||||
controls = {
|
||||
icons = {
|
||||
pause = "⏸",
|
||||
play = "▶",
|
||||
step_into = "⏎",
|
||||
step_over = "⏭",
|
||||
step_out = "⏮",
|
||||
step_back = "b",
|
||||
run_last = "▶▶",
|
||||
terminate = "⏹",
|
||||
disconnect = "⏏",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
|
||||
vim.keymap.set("n", "<F7>", dapui.toggle, { desc = "Debug: See last session result." })
|
||||
|
||||
dap.listeners.after.event_initialized["dapui_config"] = dapui.open
|
||||
dap.listeners.before.event_terminated["dapui_config"] = dapui.close
|
||||
dap.listeners.before.event_exited["dapui_config"] = dapui.close
|
||||
|
||||
-- Install golang specific config
|
||||
-- require('dap-go').setup()
|
||||
require("dap-python").setup()
|
||||
end,
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
return -- lazydocker.nvim
|
||||
{
|
||||
"mgierada/lazydocker.nvim",
|
||||
dependencies = { "akinsho/toggleterm.nvim" },
|
||||
config = function()
|
||||
require("lazydocker").setup({
|
||||
border = "curved", -- valid options are "single" | "double" | "shadow" | "curved"
|
||||
})
|
||||
end,
|
||||
event = "BufRead",
|
||||
keys = {
|
||||
{
|
||||
"<leader>ld",
|
||||
function()
|
||||
require("lazydocker").open()
|
||||
end,
|
||||
desc = "Open Lazydocker floating window",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
return {
|
||||
"dart-lang/dart-vim-plugin",
|
||||
config = function()
|
||||
vim.g.dart_html_in_string = true
|
||||
vim.g.dart_format_on_save = true
|
||||
end,
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
return {
|
||||
"nvim-flutter/flutter-tools.nvim",
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
-- "stevearc/dressing.nvim", -- optional for vim.ui.select
|
||||
},
|
||||
config = function()
|
||||
require("flutter-tools").setup({
|
||||
-- (uncomment below line for windows only)
|
||||
-- flutter_path = "home/flutter/bin/flutter.bat",
|
||||
|
||||
flutter_path = "/home/llinde/development/flutter/bin/flutter", -- <-- this takes priority over the lookup
|
||||
-- flutter_lookup_cmd = "dirname $(which flutter)", -- example "dirname $(which flutter)" or "asdf where flutter"
|
||||
-- lsp = {
|
||||
-- cmd = { "/usr/lib/flutter/bin/cache/dart-sdk/bin/dart", "language-server", "--protocol=lsp" },
|
||||
-- },
|
||||
debugger = {
|
||||
-- make these two params true to enable debug mode
|
||||
enabled = true,
|
||||
run_via_dap = true,
|
||||
register_configurations = function(_)
|
||||
require("dap").adapters.dart = {
|
||||
type = "executable",
|
||||
command = vim.fn.stdpath("data") .. "/mason/bin/dart-debug-adapter",
|
||||
args = { "flutter" },
|
||||
}
|
||||
|
||||
require("dap").configurations.dart = {
|
||||
{
|
||||
type = "dart",
|
||||
request = "launch",
|
||||
name = "Launch flutter",
|
||||
dartSdkPath = "home/flutter/bin/cache/dart-sdk/",
|
||||
flutterSdkPath = "home/flutter",
|
||||
program = "${workspaceFolder}/lib/main.dart",
|
||||
cwd = "${workspaceFolder}",
|
||||
},
|
||||
}
|
||||
-- uncomment below line if you've launch.json file already in your vscode setup
|
||||
-- require("dap.ext.vscode").load_launchjs()
|
||||
end,
|
||||
},
|
||||
dev_log = {
|
||||
-- toggle it when you run without DAP
|
||||
enabled = false,
|
||||
open_cmd = "tabedit",
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
||||
return {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
opts = {
|
||||
-- See `:help gitsigns.txt`
|
||||
signs = {
|
||||
add = { text = "+" },
|
||||
change = { text = "~" },
|
||||
delete = { text = "_" },
|
||||
topdelete = { text = "‾" },
|
||||
changedelete = { text = "~" },
|
||||
},
|
||||
signs_staged = {
|
||||
add = { text = "+" },
|
||||
change = { text = "~" },
|
||||
delete = { text = "_" },
|
||||
topdelete = { text = "‾" },
|
||||
changedelete = { text = "~" },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
return {
|
||||
"ThePrimeagen/harpoon",
|
||||
branch = "harpoon2",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
config = function()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon:setup({})
|
||||
|
||||
-- -- Use Telescope as a UI
|
||||
-- local conf = require('telescope.config').values
|
||||
-- local function toggle_telescope(harpoon_files)
|
||||
-- local file_paths = {}
|
||||
-- for _, item in ipairs(harpoon_files.items) do
|
||||
-- table.insert(file_paths, item.value)
|
||||
-- end
|
||||
--
|
||||
-- require('telescope.pickers')
|
||||
-- .new({}, {
|
||||
-- prompt_title = 'Harpoon',
|
||||
-- finder = require('telescope.finders').new_table {
|
||||
-- results = file_paths,
|
||||
-- },
|
||||
-- previewer = conf.file_previewer {},
|
||||
-- sorter = conf.generic_sorter {},
|
||||
-- })
|
||||
-- :find()
|
||||
-- end
|
||||
--
|
||||
-- vim.keymap.set('n', '<leader>M', function()
|
||||
-- toggle_telescope(harpoon:list())
|
||||
-- end, { desc = 'Open harpoon window' })
|
||||
|
||||
-- Default UI
|
||||
vim.keymap.set("n", "<leader>M", function()
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>m", function()
|
||||
harpoon:list():add()
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>1", function()
|
||||
harpoon:list():select(1)
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>2", function()
|
||||
harpoon:list():select(2)
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>3", function()
|
||||
harpoon:list():select(3)
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>4", function()
|
||||
harpoon:list():select(4)
|
||||
end)
|
||||
|
||||
-- Toggle previous & next buffers stored within Harpoon list
|
||||
vim.keymap.set("n", "<leader>p", function()
|
||||
harpoon:list():prev()
|
||||
end)
|
||||
|
||||
vim.keymap.set("n", "<leader>n", function()
|
||||
harpoon:list():next()
|
||||
end)
|
||||
end,
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
return {
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
main = "ibl",
|
||||
opts = {
|
||||
indent = {
|
||||
char = "▏",
|
||||
},
|
||||
scope = {
|
||||
show_start = false,
|
||||
show_end = false,
|
||||
show_exact_scope = false,
|
||||
},
|
||||
exclude = {
|
||||
filetypes = {
|
||||
"help",
|
||||
"startify",
|
||||
"dashboard",
|
||||
"packer",
|
||||
"neogitstatus",
|
||||
"NvimTree",
|
||||
"Trouble",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
return {
|
||||
"lervag/vimtex",
|
||||
lazy = false, -- we don't want to lazy load VimTeX
|
||||
-- tag = "v2.15", -- uncomment to pin to a specific release
|
||||
init = function()
|
||||
-- VimTeX configuration goes here, e.g.
|
||||
vim.g.vimtex_compiler_method = 'latexmk'
|
||||
vim.g.vimtex_view_method = "zathura"
|
||||
end
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
return {
|
||||
"kdheepak/lazygit.nvim",
|
||||
cmd = {
|
||||
"LazyGit",
|
||||
"LazyGitConfig",
|
||||
"LazyGitCurrentFile",
|
||||
"LazyGitFilter",
|
||||
"LazyGitFilterCurrentFile",
|
||||
},
|
||||
-- optional for floating window border decoration
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
-- setting the keybinding for LazyGit with 'keys' is recommended in
|
||||
-- order to load the plugin when the command is run for the first time
|
||||
keys = {
|
||||
-- Run LazyGit command and set background to transparent
|
||||
{
|
||||
"<leader>lg",
|
||||
"<cmd>LazyGit<cr><cmd>hi LazyGitFloat guibg=NONE guifg=NONE<cr><cmd>setlocal winhl=NormalFloat:LazyGitFloat<cr>",
|
||||
desc = "LazyGit",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
vim.g.lazygit_floating_window_winblend = 0 -- transparency of floating window (0-100)
|
||||
vim.g.lazygit_floating_window_scaling_factor = 0.9 -- scaling factor for floating window
|
||||
vim.g.lazygit_floating_window_border_chars = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" } -- customize lazygit popup window border characters
|
||||
vim.g.lazygit_floating_window_use_plenary = 0 -- use plenary.nvim to manage floating window if available
|
||||
vim.g.lazygit_use_neovim_remote = 1 -- fallback to 0 if neovim-remote is not installed
|
||||
vim.g.lazygit_use_custom_config_file_path = 0 -- config file path is evaluated if this value is 1
|
||||
vim.g.lazygit_config_file_path = {} -- table of custom config file paths
|
||||
end,
|
||||
}
|
||||
@@ -1,292 +0,0 @@
|
||||
return { -- LSP Configuration & Plugins
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
-- Automatically install LSPs and related tools to stdpath for neovim
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
"hrsh7th/nvim-cmp", -- Completion plugin
|
||||
"hrsh7th/cmp-nvim-lsp", -- LSP source for nvim-cmp
|
||||
"simrat39/rust-tools.nvim",
|
||||
|
||||
-- Useful status updates for LSP.
|
||||
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
|
||||
{
|
||||
"j-hui/fidget.nvim",
|
||||
tag = "v1.4.0",
|
||||
opts = {
|
||||
progress = {
|
||||
display = {
|
||||
done_icon = "✓", -- Icon shown when all LSP progress tasks are complete
|
||||
},
|
||||
},
|
||||
notification = {
|
||||
window = {
|
||||
winblend = 0, -- Background color opacity in the notification window
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("lsp-attach", { clear = true }),
|
||||
-- Create a function that lets us more easily define mappings specific LSP related items.
|
||||
-- It sets the mode, buffer and description for us each time.
|
||||
callback = function(event)
|
||||
local map = function(keys, func, desc)
|
||||
vim.keymap.set("n", keys, func, { buffer = event.buf, desc = "LSP: " .. desc })
|
||||
end
|
||||
|
||||
-- check if gl and ge work
|
||||
|
||||
-- Show diagnostics for the line under the cursor
|
||||
map("gl", function()
|
||||
vim.diagnostic.open_float(nil, { scope = "line" })
|
||||
end, "[G]oto [L]ine Diagnostics")
|
||||
|
||||
-- Show diagnostics for the current buffer
|
||||
map("ge", require("telescope.builtin").diagnostics, "[G]oto [E]rrors")
|
||||
|
||||
-- Jump to the definition of the word under your cursor.
|
||||
-- This is where a variable was first declared, or where a function is defined, etc.
|
||||
-- To jump back, press <C-T>.
|
||||
map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition")
|
||||
|
||||
-- Find references for the word under your cursor.
|
||||
map("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
|
||||
|
||||
-- Jump to the implementation of the word under your cursor.
|
||||
-- Useful when your language has ways of declaring types without an actual implementation.
|
||||
map("gI", require("telescope.builtin").lsp_implementations, "[G]oto [I]mplementation")
|
||||
|
||||
-- Jump to the type of the word under your cursor.
|
||||
-- Useful when you're not sure what type a variable is and you want to see
|
||||
-- the definition of its *type*, not where it was *defined*.
|
||||
map("<leader>D", require("telescope.builtin").lsp_type_definitions, "Type [D]efinition")
|
||||
|
||||
-- Fuzzy find all the symbols in your current document.
|
||||
-- Symbols are things like variables, functions, types, etc.
|
||||
map("<leader>ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols")
|
||||
|
||||
-- Fuzzy find all the symbols in your current workspace
|
||||
-- Similar to document symbols, except searches over your whole project.
|
||||
map("<leader>ws", require("telescope.builtin").lsp_dynamic_workspace_symbols, "[W]orkspace [S]ymbols")
|
||||
|
||||
-- Rename the variable under your cursor
|
||||
-- Most Language Servers support renaming across files, etc.
|
||||
map("<leader>rn", vim.lsp.buf.rename, "[R]e[n]ame")
|
||||
|
||||
-- Execute a code action, usually your cursor needs to be on top of an error
|
||||
-- or a suggestion from your LSP for this to activate.
|
||||
map("<leader>ca", vim.lsp.buf.code_action, "[C]ode [A]ction")
|
||||
|
||||
-- Opens a popup that displays documentation about the word under your cursor
|
||||
-- See `:help K` for why this keymap
|
||||
map("K", vim.lsp.buf.hover, "Hover Documentation")
|
||||
|
||||
-- WARN: This is not Goto Definition, this is Goto Declaration.
|
||||
-- For example, in C this would take you to the header
|
||||
map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
|
||||
|
||||
map("<leader>wa", vim.lsp.buf.add_workspace_folder, "[W]orkspace [A]dd Folder")
|
||||
map("<leader>wr", vim.lsp.buf.remove_workspace_folder, "[W]orkspace [R]emove Folder")
|
||||
map("<leader>wl", function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, "[W]orkspace [L]ist Folders")
|
||||
|
||||
-- The following two autocommands are used to highlight references of the
|
||||
-- word under your cursor when your cursor rests there for a little while.
|
||||
-- See `:help CursorHold` for information about when this is executed
|
||||
--
|
||||
-- When you move your cursor, the highlights will be cleared (the second autocommand).
|
||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||
if client and client.server_capabilities.documentHighlightProvider then
|
||||
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
||||
buffer = event.buf,
|
||||
callback = vim.lsp.buf.document_highlight,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
|
||||
buffer = event.buf,
|
||||
callback = vim.lsp.buf.clear_references,
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = vim.tbl_deep_extend("force", capabilities, require("cmp_nvim_lsp").default_capabilities())
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
-- Enable the following language servers
|
||||
local servers = {
|
||||
html = { filetypes = { "html", "twig", "hbs" } },
|
||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||
ts_ls = {},
|
||||
lua_ls = {
|
||||
-- cmd = {...},
|
||||
-- filetypes { ...},
|
||||
-- capabilities = {},
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = { version = "LuaJIT" },
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
-- Tells lua_ls where to find all the Lua files that you have loaded
|
||||
-- for your neovim configuration.
|
||||
library = {
|
||||
"${3rd}/luv/library",
|
||||
unpack(vim.api.nvim_get_runtime_file("", true)),
|
||||
},
|
||||
-- If lua_ls is really slow on your computer, you can try this instead:
|
||||
-- library = { vim.env.VIMRUNTIME },
|
||||
},
|
||||
completion = {
|
||||
callSnippet = "Replace",
|
||||
},
|
||||
telemetry = { enable = false },
|
||||
diagnostics = { disable = { "missing-fields" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
-- dcm = {},
|
||||
dockerls = {},
|
||||
docker_compose_language_service = {},
|
||||
pylsp = {
|
||||
settings = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
pyflakes = { enabled = false },
|
||||
pycodestyle = { enabled = false },
|
||||
autopep8 = { enabled = false },
|
||||
yapf = { enabled = false },
|
||||
mccabe = { enabled = false },
|
||||
pylsp_mypy = { enabled = false },
|
||||
pylsp_black = { enabled = false },
|
||||
pylsp_isort = { enabled = false },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- basedpyright = {
|
||||
-- -- Config options: https://github.com/DetachHead/basedpyright/blob/main/docs/settings.md
|
||||
-- settings = {
|
||||
-- basedpyright = {
|
||||
-- disableOrganizeImports = true, -- Using Ruff's import organizer
|
||||
-- disableLanguageServices = false,
|
||||
-- analysis = {
|
||||
-- ignore = { '*' }, -- Ignore all files for analysis to exclusively use Ruff for linting
|
||||
-- typeCheckingMode = 'off',
|
||||
-- diagnosticMode = 'openFilesOnly', -- Only analyze open files
|
||||
-- useLibraryCodeForTypes = true,
|
||||
-- autoImportCompletions = true, -- whether pyright offers auto-import completions
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
clangd = {
|
||||
cmd = {
|
||||
"clangd",
|
||||
"--background-index",
|
||||
"--clang-tidy",
|
||||
"--header-insertion=iwyu",
|
||||
"--completion-style=detailed",
|
||||
"--function-arg-placeholders",
|
||||
"--fallback-style=llvm",
|
||||
},
|
||||
filetypes = { "c", "cpp", "objc", "objcpp", "hpp" },
|
||||
},
|
||||
ruff = {
|
||||
-- Notes on code actions: https://github.com/astral-sh/ruff-lsp/issues/119#issuecomment-1595628355
|
||||
-- Get isort like behavior: https://github.com/astral-sh/ruff/issues/8926#issuecomment-1834048218
|
||||
commands = {
|
||||
RuffAutofix = {
|
||||
function()
|
||||
vim.lsp.buf.execute_command({
|
||||
command = "ruff.applyAutofix",
|
||||
arguments = {
|
||||
{ uri = vim.uri_from_bufnr(0) },
|
||||
},
|
||||
})
|
||||
end,
|
||||
description = "Ruff: Fix all auto-fixable problems",
|
||||
},
|
||||
RuffOrganizeImports = {
|
||||
function()
|
||||
vim.lsp.buf.execute_command({
|
||||
command = "ruff.applyOrganizeImports",
|
||||
arguments = {
|
||||
{ uri = vim.uri_from_bufnr(0) },
|
||||
},
|
||||
})
|
||||
end,
|
||||
description = "Ruff: Format imports",
|
||||
},
|
||||
},
|
||||
},
|
||||
rust_analyzer = {
|
||||
["rust-analyzer"] = {
|
||||
cargo = {
|
||||
features = "all",
|
||||
},
|
||||
checkOnSave = true,
|
||||
check = {
|
||||
command = "clippy",
|
||||
},
|
||||
},
|
||||
},
|
||||
tailwindcss = {},
|
||||
jsonls = {},
|
||||
sqlls = {},
|
||||
terraformls = {},
|
||||
yamlls = {},
|
||||
bashls = {},
|
||||
graphql = {},
|
||||
cssls = {},
|
||||
ltex = {
|
||||
language = "de-DE",
|
||||
},
|
||||
texlab = {},
|
||||
-- Java Language Server configuration
|
||||
jdtls = {},
|
||||
}
|
||||
|
||||
-- Ensure the servers and tools above are installed
|
||||
require("mason").setup()
|
||||
|
||||
-- You can add other tools here that you want Mason to install
|
||||
-- for you, so that they are available from within Neovim.
|
||||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
"stylua", -- Used to format lua code
|
||||
})
|
||||
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
handlers = {
|
||||
function(server_name)
|
||||
local server = servers[server_name] or {}
|
||||
-- This handles overriding only values explicitly passed
|
||||
-- by the server configuration above. Useful when disabling
|
||||
-- certain features of an LSP (for example, turning off formatting for tsserver)
|
||||
server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {})
|
||||
require("lspconfig")[server_name].setup(server)
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
local rt = require("rust-tools")
|
||||
|
||||
rt.setup({
|
||||
server = {
|
||||
on_attach = function(_, bufnr)
|
||||
-- Hover actions
|
||||
vim.keymap.set("n", "<C-space>", rt.hover_actions.hover_actions, { buffer = bufnr })
|
||||
-- Code action groups
|
||||
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
|
||||
end,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
-- Set lualine as statusline
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
config = function()
|
||||
-- Adapted from: https://github.com/nvim-lualine/lualine.nvim/blob/master/lua/lualine/themes/onedark.lua
|
||||
local colors = {
|
||||
blue = '#61afef',
|
||||
green = '#98c379',
|
||||
purple = '#c678dd',
|
||||
cyan = '#56b6c2',
|
||||
red1 = '#e06c75',
|
||||
red2 = '#be5046',
|
||||
yellow = '#e5c07b',
|
||||
fg = '#abb2bf',
|
||||
bg = '#282c34',
|
||||
gray1 = '#828997',
|
||||
gray2 = '#2c323c',
|
||||
gray3 = '#3e4452',
|
||||
}
|
||||
|
||||
local onedark_theme = {
|
||||
normal = {
|
||||
a = { fg = colors.bg, bg = colors.green, gui = 'bold' },
|
||||
b = { fg = colors.fg, bg = colors.gray3 },
|
||||
c = { fg = colors.fg, bg = colors.gray2 },
|
||||
},
|
||||
command = { a = { fg = colors.bg, bg = colors.yellow, gui = 'bold' } },
|
||||
insert = { a = { fg = colors.bg, bg = colors.blue, gui = 'bold' } },
|
||||
visual = { a = { fg = colors.bg, bg = colors.purple, gui = 'bold' } },
|
||||
terminal = { a = { fg = colors.bg, bg = colors.cyan, gui = 'bold' } },
|
||||
replace = { a = { fg = colors.bg, bg = colors.red1, gui = 'bold' } },
|
||||
inactive = {
|
||||
a = { fg = colors.gray1, bg = colors.bg, gui = 'bold' },
|
||||
b = { fg = colors.gray1, bg = colors.bg },
|
||||
c = { fg = colors.gray1, bg = colors.gray2 },
|
||||
},
|
||||
}
|
||||
|
||||
-- Import color theme based on environment variable NVIM_THEME
|
||||
local env_var_nvim_theme = os.getenv 'NVIM_THEME' or 'nord'
|
||||
|
||||
-- Define a table of themes
|
||||
local themes = {
|
||||
onedark = onedark_theme,
|
||||
nord = 'nord',
|
||||
}
|
||||
|
||||
local mode = {
|
||||
'mode',
|
||||
fmt = function(str)
|
||||
-- return ' ' .. str:sub(1, 1) -- displays only the first character of the mode
|
||||
return ' ' .. str
|
||||
end,
|
||||
}
|
||||
|
||||
local filename = {
|
||||
'filename',
|
||||
file_status = true, -- displays file status (readonly status, modified status)
|
||||
path = 0, -- 0 = just filename, 1 = relative path, 2 = absolute path
|
||||
}
|
||||
|
||||
local hide_in_width = function()
|
||||
return vim.fn.winwidth(0) > 100
|
||||
end
|
||||
|
||||
local diagnostics = {
|
||||
'diagnostics',
|
||||
sources = { 'nvim_diagnostic' },
|
||||
sections = { 'error', 'warn' },
|
||||
symbols = { error = ' ', warn = ' ', info = ' ', hint = ' ' },
|
||||
colored = false,
|
||||
update_in_insert = false,
|
||||
always_visible = false,
|
||||
cond = hide_in_width,
|
||||
}
|
||||
|
||||
local diff = {
|
||||
'diff',
|
||||
colored = false,
|
||||
symbols = { added = ' ', modified = ' ', removed = ' ' }, -- changes diff symbols
|
||||
cond = hide_in_width,
|
||||
}
|
||||
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = themes[env_var_nvim_theme], -- Set theme based on environment variable
|
||||
-- Some useful glyphs:
|
||||
-- https://www.nerdfonts.com/cheat-sheet
|
||||
--
|
||||
section_separators = { left = '', right = '' },
|
||||
component_separators = { left = '', right = '' },
|
||||
disabled_filetypes = { 'alpha', 'neo-tree', 'Avante' },
|
||||
always_divide_middle = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { mode },
|
||||
lualine_b = { 'branch' },
|
||||
lualine_c = { filename },
|
||||
lualine_x = { diagnostics, diff, { 'encoding', cond = hide_in_width }, { 'filetype', cond = hide_in_width } },
|
||||
lualine_y = { 'location' },
|
||||
lualine_z = { 'progress' },
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { { 'filename', path = 1 } },
|
||||
lualine_x = { { 'location', padding = 0 } },
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
tabline = {},
|
||||
extensions = { 'fugitive' },
|
||||
}
|
||||
end,
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
-- Standalone plugins with less than 10 lines of config go here
|
||||
return {
|
||||
{
|
||||
-- tmux & split window navigation
|
||||
"christoomey/vim-tmux-navigator",
|
||||
},
|
||||
{
|
||||
-- autoclose tags
|
||||
"windwp/nvim-ts-autotag",
|
||||
},
|
||||
{
|
||||
-- detect tabstop and shiftwidth automatically
|
||||
"tpope/vim-sleuth",
|
||||
},
|
||||
{
|
||||
-- Powerful Git integration for Vim
|
||||
"tpope/vim-fugitive",
|
||||
},
|
||||
{
|
||||
-- GitHub integration for vim-fugitive
|
||||
"tpope/vim-rhubarb",
|
||||
},
|
||||
{
|
||||
-- Hints keybinds
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
-- win = {
|
||||
-- border = {
|
||||
-- { '┌', 'FloatBorder' },
|
||||
-- { '─', 'FloatBorder' },
|
||||
-- { '┐', 'FloatBorder' },
|
||||
-- { '│', 'FloatBorder' },
|
||||
-- { '┘', 'FloatBorder' },
|
||||
-- { '─', 'FloatBorder' },
|
||||
-- { '└', 'FloatBorder' },
|
||||
-- { '│', 'FloatBorder' },
|
||||
-- },
|
||||
-- },
|
||||
},
|
||||
},
|
||||
{
|
||||
-- Autoclose parentheses, brackets, quotes, etc.
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
config = true,
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
-- Highlight todo, notes, etc in comments
|
||||
"folke/todo-comments.nvim",
|
||||
event = "VimEnter",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
opts = { signs = false },
|
||||
},
|
||||
{
|
||||
-- high-performance color highlighter
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
config = function()
|
||||
require("colorizer").setup()
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -1,327 +0,0 @@
|
||||
return {
|
||||
"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
|
||||
{
|
||||
's1n7ax/nvim-window-picker',
|
||||
version = '2.*',
|
||||
config = function()
|
||||
require 'window-picker'.setup({
|
||||
filter_rules = {
|
||||
include_current_win = false,
|
||||
autoselect_one = true,
|
||||
-- filter using buffer options
|
||||
bo = {
|
||||
-- if the file type is one of following, the window will be ignored
|
||||
filetype = { 'neo-tree', "neo-tree-popup", "notify" },
|
||||
-- if the buffer type is one of following, the window will be ignored
|
||||
buftype = { 'terminal', "quickfix" },
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function ()
|
||||
-- If you want icons for diagnostic errors, you'll need to define them somewhere:
|
||||
vim.fn.sign_define("DiagnosticSignError",
|
||||
{text = " ", texthl = "DiagnosticSignError"})
|
||||
vim.fn.sign_define("DiagnosticSignWarn",
|
||||
{text = " ", texthl = "DiagnosticSignWarn"})
|
||||
vim.fn.sign_define("DiagnosticSignInfo",
|
||||
{text = " ", texthl = "DiagnosticSignInfo"})
|
||||
vim.fn.sign_define("DiagnosticSignHint",
|
||||
{text = "", texthl = "DiagnosticSignHint"})
|
||||
|
||||
require("neo-tree").setup({
|
||||
close_if_last_window = false, -- Close Neo-tree if it is the last window left in the tab
|
||||
popup_border_style = "rounded",
|
||||
enable_git_status = true,
|
||||
enable_diagnostics = true,
|
||||
open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes
|
||||
sort_case_insensitive = false, -- used when sorting files and directories in the tree
|
||||
sort_function = nil , -- use a custom function for sorting files and directories in the tree
|
||||
-- sort_function = function (a,b)
|
||||
-- if a.type == b.type then
|
||||
-- return a.path > b.path
|
||||
-- else
|
||||
-- return a.type > b.type
|
||||
-- end
|
||||
-- end , -- this sorts files and directories descendantly
|
||||
default_component_configs = {
|
||||
container = {
|
||||
enable_character_fade = true
|
||||
},
|
||||
indent = {
|
||||
indent_size = 2,
|
||||
padding = 1, -- extra padding on left hand side
|
||||
-- indent guides
|
||||
with_markers = true,
|
||||
indent_marker = "│",
|
||||
last_indent_marker = "└",
|
||||
highlight = "NeoTreeIndentMarker",
|
||||
-- expander config, needed for nesting files
|
||||
with_expanders = nil, -- if nil and file nesting is enabled, will enable expanders
|
||||
expander_collapsed = "",
|
||||
expander_expanded = "",
|
||||
expander_highlight = "NeoTreeExpander",
|
||||
},
|
||||
icon = {
|
||||
folder_closed = "",
|
||||
folder_open = "",
|
||||
folder_empty = "",
|
||||
provider = function(icon, node, state) -- default icon provider utilizes nvim-web-devicons if available
|
||||
if node.type == "file" or node.type == "terminal" then
|
||||
local success, web_devicons = pcall(require, "nvim-web-devicons")
|
||||
local name = node.type == "terminal" and "terminal" or node.name
|
||||
if success then
|
||||
local devicon, hl = web_devicons.get_icon(name)
|
||||
icon.text = devicon or icon.text
|
||||
icon.highlight = hl or icon.highlight
|
||||
end
|
||||
end
|
||||
end,
|
||||
-- The next two settings are only a fallback, if you use nvim-web-devicons and configure default icons there
|
||||
-- then these will never be used.
|
||||
default = "*",
|
||||
highlight = "NeoTreeFileIcon"
|
||||
},
|
||||
modified = {
|
||||
symbol = "[+]",
|
||||
highlight = "NeoTreeModified",
|
||||
},
|
||||
name = {
|
||||
trailing_slash = false,
|
||||
use_git_status_colors = true,
|
||||
highlight = "NeoTreeFileName",
|
||||
},
|
||||
git_status = {
|
||||
symbols = {
|
||||
-- Change type
|
||||
added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name
|
||||
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
|
||||
deleted = "✖",-- this can only be used in the git_status source
|
||||
renamed = "",-- this can only be used in the git_status source
|
||||
-- Status type
|
||||
untracked = "",
|
||||
ignored = "",
|
||||
unstaged = "",
|
||||
staged = "",
|
||||
conflict = "",
|
||||
}
|
||||
},
|
||||
-- If you don't want to use these columns, you can set `enabled = false` for each of them individually
|
||||
file_size = {
|
||||
enabled = true,
|
||||
required_width = 64, -- min width of window required to show this column
|
||||
},
|
||||
type = {
|
||||
enabled = true,
|
||||
required_width = 122, -- min width of window required to show this column
|
||||
},
|
||||
last_modified = {
|
||||
enabled = true,
|
||||
required_width = 88, -- min width of window required to show this column
|
||||
},
|
||||
created = {
|
||||
enabled = true,
|
||||
required_width = 110, -- min width of window required to show this column
|
||||
},
|
||||
symlink_target = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
-- A list of functions, each representing a global custom command
|
||||
-- that will be available in all sources (if not overridden in `opts[source_name].commands`)
|
||||
-- see `:h neo-tree-custom-commands-global`
|
||||
commands = {},
|
||||
window = {
|
||||
position = "left",
|
||||
width = 40,
|
||||
mapping_options = {
|
||||
noremap = true,
|
||||
nowait = true,
|
||||
},
|
||||
mappings = {
|
||||
["<space>"] = {
|
||||
"toggle_node",
|
||||
nowait = false, -- disable `nowait` if you have existing combos starting with this char that you want to use
|
||||
},
|
||||
["<2-LeftMouse>"] = "open",
|
||||
["<cr>"] = "open",
|
||||
["<esc>"] = "cancel", -- close preview or floating neo-tree window
|
||||
["P"] = { "toggle_preview", config = { use_float = true, use_image_nvim = true } },
|
||||
-- Read `# Preview Mode` for more information
|
||||
["l"] = "focus_preview",
|
||||
["S"] = "open_split",
|
||||
["s"] = "open_vsplit",
|
||||
-- ["S"] = "split_with_window_picker",
|
||||
-- ["s"] = "vsplit_with_window_picker",
|
||||
["t"] = "open_tabnew",
|
||||
-- ["<cr>"] = "open_drop",
|
||||
-- ["t"] = "open_tab_drop",
|
||||
["w"] = "open_with_window_picker",
|
||||
--["P"] = "toggle_preview", -- enter preview mode, which shows the current node without focusing
|
||||
["C"] = "close_node",
|
||||
-- ['C'] = 'close_all_subnodes',
|
||||
["z"] = "close_all_nodes",
|
||||
--["Z"] = "expand_all_nodes",
|
||||
["a"] = {
|
||||
"add",
|
||||
-- this command supports BASH style brace expansion ("x{a,b,c}" -> xa,xb,xc). see `:h neo-tree-file-actions` for details
|
||||
-- some commands may take optional config options, see `:h neo-tree-mappings` for details
|
||||
config = {
|
||||
show_path = "none" -- "none", "relative", "absolute"
|
||||
}
|
||||
},
|
||||
["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion.
|
||||
["d"] = "delete",
|
||||
["r"] = "rename",
|
||||
["y"] = "copy_to_clipboard",
|
||||
["x"] = "cut_to_clipboard",
|
||||
["p"] = "paste_from_clipboard",
|
||||
["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add":
|
||||
-- ["c"] = {
|
||||
-- "copy",
|
||||
-- config = {
|
||||
-- show_path = "none" -- "none", "relative", "absolute"
|
||||
-- }
|
||||
--}
|
||||
["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add".
|
||||
["q"] = "close_window",
|
||||
["R"] = "refresh",
|
||||
["?"] = "show_help",
|
||||
["<"] = "prev_source",
|
||||
[">"] = "next_source",
|
||||
["i"] = "show_file_details",
|
||||
}
|
||||
},
|
||||
nesting_rules = {},
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = false, -- when true, they will just be displayed differently than normal items
|
||||
hide_dotfiles = true,
|
||||
hide_gitignored = true,
|
||||
hide_hidden = true, -- only works on Windows for hidden files/directories
|
||||
hide_by_name = {
|
||||
--"node_modules"
|
||||
},
|
||||
hide_by_pattern = { -- uses glob style patterns
|
||||
--"*.meta",
|
||||
--"*/src/*/tsconfig.json",
|
||||
},
|
||||
always_show = { -- remains visible even if other settings would normally hide it
|
||||
--".gitignored",
|
||||
},
|
||||
always_show_by_pattern = { -- uses glob style patterns
|
||||
--".env*",
|
||||
},
|
||||
never_show = { -- remains hidden even if visible is toggled to true, this overrides always_show
|
||||
--".DS_Store",
|
||||
--"thumbs.db"
|
||||
},
|
||||
never_show_by_pattern = { -- uses glob style patterns
|
||||
--".null-ls_*",
|
||||
},
|
||||
},
|
||||
follow_current_file = {
|
||||
enabled = false, -- This will find and focus the file in the active buffer every time
|
||||
-- -- the current file is changed while the tree is open.
|
||||
leave_dirs_open = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal`
|
||||
},
|
||||
group_empty_dirs = false, -- when true, empty folders will be grouped together
|
||||
hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree
|
||||
-- in whatever position is specified in window.position
|
||||
-- "open_current", -- netrw disabled, opening a directory opens within the
|
||||
-- window like netrw would, regardless of window.position
|
||||
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
|
||||
use_libuv_file_watcher = false, -- This will use the OS level file watchers to detect changes
|
||||
-- instead of relying on nvim autocmd events.
|
||||
window = {
|
||||
mappings = {
|
||||
["<bs>"] = "navigate_up",
|
||||
["."] = "set_root",
|
||||
["H"] = "toggle_hidden",
|
||||
["/"] = "fuzzy_finder",
|
||||
["D"] = "fuzzy_finder_directory",
|
||||
["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm
|
||||
-- ["D"] = "fuzzy_sorter_directory",
|
||||
["f"] = "filter_on_submit",
|
||||
["<c-x>"] = "clear_filter",
|
||||
["[g"] = "prev_git_modified",
|
||||
["]g"] = "next_git_modified",
|
||||
["o"] = { "show_help", nowait=false, config = { title = "Order by", prefix_key = "o" }},
|
||||
["oc"] = { "order_by_created", nowait = false },
|
||||
["od"] = { "order_by_diagnostics", nowait = false },
|
||||
["og"] = { "order_by_git_status", nowait = false },
|
||||
["om"] = { "order_by_modified", nowait = false },
|
||||
["on"] = { "order_by_name", nowait = false },
|
||||
["os"] = { "order_by_size", nowait = false },
|
||||
["ot"] = { "order_by_type", nowait = false },
|
||||
-- ['<key>'] = function(state) ... end,
|
||||
},
|
||||
fuzzy_finder_mappings = { -- define keymaps for filter popup window in fuzzy_finder_mode
|
||||
["<down>"] = "move_cursor_down",
|
||||
["<C-n>"] = "move_cursor_down",
|
||||
["<up>"] = "move_cursor_up",
|
||||
["<C-p>"] = "move_cursor_up",
|
||||
-- ['<key>'] = function(state, scroll_padding) ... end,
|
||||
},
|
||||
},
|
||||
|
||||
commands = {} -- Add a custom command or override a global one using the same function name
|
||||
},
|
||||
buffers = {
|
||||
follow_current_file = {
|
||||
enabled = true, -- This will find and focus the file in the active buffer every time
|
||||
-- -- the current file is changed while the tree is open.
|
||||
leave_dirs_open = false, -- `false` closes auto expanded dirs, such as with `:Neotree reveal`
|
||||
},
|
||||
group_empty_dirs = true, -- when true, empty folders will be grouped together
|
||||
show_unloaded = true,
|
||||
window = {
|
||||
mappings = {
|
||||
["bd"] = "buffer_delete",
|
||||
["<bs>"] = "navigate_up",
|
||||
["."] = "set_root",
|
||||
["o"] = { "show_help", nowait=false, config = { title = "Order by", prefix_key = "o" }},
|
||||
["oc"] = { "order_by_created", nowait = false },
|
||||
["od"] = { "order_by_diagnostics", nowait = false },
|
||||
["om"] = { "order_by_modified", nowait = false },
|
||||
["on"] = { "order_by_name", nowait = false },
|
||||
["os"] = { "order_by_size", nowait = false },
|
||||
["ot"] = { "order_by_type", nowait = false },
|
||||
}
|
||||
},
|
||||
},
|
||||
git_status = {
|
||||
window = {
|
||||
position = "float",
|
||||
mappings = {
|
||||
["A"] = "git_add_all",
|
||||
["gu"] = "git_unstage_file",
|
||||
["ga"] = "git_add_file",
|
||||
["gr"] = "git_revert_file",
|
||||
["gc"] = "git_commit",
|
||||
["gp"] = "git_push",
|
||||
["gg"] = "git_commit_and_push",
|
||||
["o"] = { "show_help", nowait=false, config = { title = "Order by", prefix_key = "o" }},
|
||||
["oc"] = { "order_by_created", nowait = false },
|
||||
["od"] = { "order_by_diagnostics", nowait = false },
|
||||
["om"] = { "order_by_modified", nowait = false },
|
||||
["on"] = { "order_by_name", nowait = false },
|
||||
["os"] = { "order_by_size", nowait = false },
|
||||
["ot"] = { "order_by_type", nowait = false },
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
vim.cmd([[nnoremap \ :Neotree reveal<cr>]])
|
||||
vim.keymap.set('n', '<leader>e', ':Neotree toggle position=left<CR>', { noremap = true, silent = true })
|
||||
end
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
-- Format on save and linters
|
||||
return {
|
||||
"nvimtools/none-ls.nvim",
|
||||
dependencies = {
|
||||
"nvimtools/none-ls-extras.nvim",
|
||||
"jayp0521/mason-null-ls.nvim", -- ensure dependencies are installed
|
||||
},
|
||||
config = function()
|
||||
local null_ls = require("null-ls")
|
||||
local formatting = null_ls.builtins.formatting -- to setup formatters
|
||||
local diagnostics = null_ls.builtins.diagnostics -- to setup linters
|
||||
|
||||
-- list of formatters & linters for mason to install
|
||||
require("mason-null-ls").setup({
|
||||
ensure_installed = {
|
||||
"checkmake",
|
||||
"prettier", -- ts/js formatter
|
||||
"stylua", -- lua formatter
|
||||
"eslint_d", -- ts/js linter
|
||||
"shfmt",
|
||||
"ruff",
|
||||
},
|
||||
-- auto-install configured formatters & linters (with null-ls)
|
||||
automatic_installation = true,
|
||||
})
|
||||
|
||||
local sources = {
|
||||
diagnostics.checkmake,
|
||||
formatting.prettier.with({ filetypes = { "html", "json", "yaml", "markdown" } }),
|
||||
formatting.stylua,
|
||||
formatting.shfmt.with({ args = { "-i", "4" } }),
|
||||
formatting.terraform_fmt,
|
||||
require("none-ls.formatting.ruff").with({ extra_args = { "--extend-select", "I" } }),
|
||||
require("none-ls.formatting.ruff_format"),
|
||||
}
|
||||
|
||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||
null_ls.setup({
|
||||
-- debug = true, -- Enable debug mode. Inspect logs with :NullLsLog.
|
||||
sources = sources,
|
||||
-- you can reuse a shared lspconfig on_attach callback here
|
||||
on_attach = function(client, bufnr)
|
||||
if client.supports_method("textDocument/formatting") then
|
||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = augroup,
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
vim.lsp.buf.format({ async = false })
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
return {
|
||||
"mfussenegger/nvim-jdtls",
|
||||
ft = "java",
|
||||
config = function()
|
||||
require("jdtls").start_or_attach({
|
||||
cmd = { "/home/llinde/.local/share/nvim/mason/packages/jdtls/bin/jdtls" },
|
||||
root_dir = require("jdtls.setup").find_root({ "gradlew", ".git", "mvnw" }),
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
-- Fuzzy Finder (files, lsp, etc)
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
branch = "0.1.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
|
||||
-- Only load if `make` is available. Make sure you have the system
|
||||
-- requirements installed.
|
||||
{
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
cond = function()
|
||||
return vim.fn.executable("make") == 1
|
||||
end,
|
||||
},
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
|
||||
-- Useful for getting pretty icons, but requires a Nerd Font.
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = function()
|
||||
local telescope = require("telescope")
|
||||
local actions = require("telescope.actions")
|
||||
local builtin = require("telescope.builtin")
|
||||
|
||||
require("telescope").setup({
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
["<C-k>"] = actions.move_selection_previous, -- move to prev result
|
||||
["<C-j>"] = actions.move_selection_next, -- move to next result
|
||||
["<C-l>"] = actions.select_default, -- open file
|
||||
},
|
||||
n = {
|
||||
["q"] = actions.close,
|
||||
},
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
file_ignore_patterns = { "node_modules", ".git", ".venv" },
|
||||
hidden = true,
|
||||
},
|
||||
buffers = {
|
||||
initial_mode = "normal",
|
||||
sort_lastused = true,
|
||||
-- sort_mru = true,
|
||||
mappings = {
|
||||
n = {
|
||||
["d"] = actions.delete_buffer,
|
||||
["l"] = actions.select_default,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
live_grep = {
|
||||
file_ignore_patterns = { "node_modules", ".git", ".venv" },
|
||||
additional_args = function(_)
|
||||
return { "--hidden" }
|
||||
end,
|
||||
},
|
||||
path_display = {
|
||||
filename_first = {
|
||||
reverse_directories = true,
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown(),
|
||||
},
|
||||
},
|
||||
git_files = {
|
||||
previewer = false,
|
||||
},
|
||||
})
|
||||
|
||||
-- Enable telescope fzf native, if installed
|
||||
pcall(require("telescope").load_extension, "fzf")
|
||||
pcall(require("telescope").load_extension, "ui-select")
|
||||
|
||||
require("telescope").load_extension("flutter")
|
||||
vim.keymap.set("n", "<leader>tf", ":Telescope flutter commands<CR>", { desc = "[T]elescope [F]lutter" })
|
||||
vim.keymap.set("n", "<leader>?", builtin.oldfiles, { desc = "[?] Find recently opened files" })
|
||||
vim.keymap.set("n", "<leader>sb", builtin.buffers, { desc = "[S]earch existing [B]uffers" })
|
||||
vim.keymap.set("n", "<leader>sm", builtin.marks, { desc = "[S]earch [M]arks" })
|
||||
vim.keymap.set("n", "<leader>gf", builtin.git_files, { desc = "Search [G]it [F]iles" })
|
||||
vim.keymap.set("n", "<leader>gc", builtin.git_commits, { desc = "Search [G]it [C]ommits" })
|
||||
vim.keymap.set("n", "<leader>gcf", builtin.git_bcommits, { desc = "Search [G]it [C]ommits for current [F]ile" })
|
||||
vim.keymap.set("n", "<leader>gb", builtin.git_branches, { desc = "Search [G]it [B]ranches" })
|
||||
vim.keymap.set("n", "<leader>gs", builtin.git_status, { desc = "Search [G]it [S]tatus (diff view)" })
|
||||
vim.keymap.set("n", "<leader>sf", builtin.find_files, { desc = "[S]earch [F]iles" })
|
||||
vim.keymap.set("n", "<leader>sh", builtin.help_tags, { desc = "[S]earch [H]elp" })
|
||||
vim.keymap.set("n", "<leader>sw", builtin.grep_string, { desc = "[S]earch current [W]ord" })
|
||||
vim.keymap.set("n", "<leader>sg", builtin.live_grep, { desc = "[S]earch by [G]rep" })
|
||||
vim.keymap.set("n", "<leader>sd", builtin.diagnostics, { desc = "[S]earch [D]iagnostics" })
|
||||
vim.keymap.set("n", "<leader>sr", builtin.resume, { desc = "[S]earch [R]resume" })
|
||||
vim.keymap.set("n", "<leader>s.", builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
|
||||
vim.keymap.set("n", "<leader>sds", function()
|
||||
builtin.lsp_document_symbols({
|
||||
symbols = { "Class", "Function", "Method", "Constructor", "Interface", "Module", "Property" },
|
||||
})
|
||||
end, { desc = "[S]each LSP document [S]ymbols" })
|
||||
vim.keymap.set("n", "<leader><leader>", builtin.buffers, { desc = "[ ] Find existing buffers" })
|
||||
vim.keymap.set("n", "<leader>s/", function()
|
||||
builtin.live_grep({
|
||||
grep_open_files = true,
|
||||
prompt_title = "Live Grep in Open Files",
|
||||
})
|
||||
end, { desc = "[S]earch [/] in Open Files" })
|
||||
vim.keymap.set("n", "<leader>/", function()
|
||||
-- You can pass additional configuration to telescope to change theme, layout, etc.
|
||||
builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({
|
||||
previewer = false,
|
||||
}))
|
||||
end, { desc = "[/] Fuzzily search in current buffer" })
|
||||
end,
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
-- Highlight, edit, and navigate code
|
||||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
dependencies = {
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
},
|
||||
config = function()
|
||||
require('nvim-treesitter.configs').setup {
|
||||
-- Add languages to be installed here that you want installed for treesitter
|
||||
ensure_installed = {
|
||||
'lua',
|
||||
'python',
|
||||
'javascript',
|
||||
'typescript',
|
||||
'vimdoc',
|
||||
'vim',
|
||||
'regex',
|
||||
'sql',
|
||||
'dockerfile',
|
||||
'json',
|
||||
'java',
|
||||
'go',
|
||||
'gitignore',
|
||||
'graphql',
|
||||
'yaml',
|
||||
'make',
|
||||
'cmake',
|
||||
'markdown',
|
||||
'markdown_inline',
|
||||
'bash',
|
||||
'tsx',
|
||||
'css',
|
||||
'html',
|
||||
'latex',
|
||||
},
|
||||
|
||||
-- Autoinstall languages that are not installed
|
||||
auto_install = true,
|
||||
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = '<c-space>',
|
||||
node_incremental = '<c-space>',
|
||||
scope_incremental = '<c-s>',
|
||||
node_decremental = '<M-space>',
|
||||
},
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
['aa'] = '@parameter.outer',
|
||||
['ia'] = '@parameter.inner',
|
||||
['af'] = '@function.outer',
|
||||
['if'] = '@function.inner',
|
||||
['ac'] = '@class.outer',
|
||||
['ic'] = '@class.inner',
|
||||
},
|
||||
},
|
||||
move = {
|
||||
enable = true,
|
||||
set_jumps = true, -- whether to set jumps in the jumplist
|
||||
goto_next_start = {
|
||||
[']m'] = '@function.outer',
|
||||
[']]'] = '@class.outer',
|
||||
},
|
||||
goto_next_end = {
|
||||
[']M'] = '@function.outer',
|
||||
[']['] = '@class.outer',
|
||||
},
|
||||
goto_previous_start = {
|
||||
['[m'] = '@function.outer',
|
||||
['[['] = '@class.outer',
|
||||
},
|
||||
goto_previous_end = {
|
||||
['[M'] = '@function.outer',
|
||||
['[]'] = '@class.outer',
|
||||
},
|
||||
},
|
||||
swap = {
|
||||
enable = true,
|
||||
swap_next = {
|
||||
['<leader>a'] = '@parameter.inner',
|
||||
},
|
||||
swap_previous = {
|
||||
['<leader>A'] = '@parameter.inner',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Register additional file extensions
|
||||
vim.filetype.add { extension = { tf = 'terraform' } }
|
||||
vim.filetype.add { extension = { tfvars = 'terraform' } }
|
||||
vim.filetype.add { extension = { pipeline = 'groovy' } }
|
||||
vim.filetype.add { extension = { multibranch = 'groovy' } }
|
||||
end,
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
return {
|
||||
{
|
||||
"CopilotC-Nvim/CopilotChat.nvim",
|
||||
branch = "canary",
|
||||
branch = "main",
|
||||
dependencies = {
|
||||
{ "github/copilot.vim" },
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
@@ -66,11 +66,13 @@ return {
|
||||
selection = copilot_select.diagnostics,
|
||||
},
|
||||
Commit = {
|
||||
prompt = "Write commit message for the change with commitizen convention. Make sure the title has maximum 50 characters and message is wrapped at 72 characters. Wrap the whole message in code block with language gitcommit.",
|
||||
prompt =
|
||||
"Write commit message for the change with commitizen convention. Make sure the title has maximum 50 characters and message is wrapped at 72 characters. Wrap the whole message in code block with language gitcommit.",
|
||||
selection = copilot_select.gitdiff,
|
||||
},
|
||||
CommitStaged = {
|
||||
prompt = "Write commit message for the change with commitizen convention. Make sure the title has maximum 50 characters and message is wrapped at 72 characters. Wrap the whole message in code block with language gitcommit.",
|
||||
prompt =
|
||||
"Write commit message for the change with commitizen convention. Make sure the title has maximum 50 characters and message is wrapped at 72 characters. Wrap the whole message in code block with language gitcommit.",
|
||||
selection = function(source)
|
||||
return copilot_select.gitdiff(source, true)
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user