424 lines
16 KiB
Lua
424 lines
16 KiB
Lua
local vim = vim
|
|
local host = vim.loop.os_gethostname()
|
|
|
|
vim.pack.add({
|
|
-- { src = "https://github.com/folke/tokyonight.nvim" },
|
|
{ src = "https://github.com/scottmckendry/cyberdream.nvim" },
|
|
{ src = "https://github.com/nvim-tree/nvim-web-devicons" },
|
|
{ src = "https://github.com/ibhagwan/fzf-lua" },
|
|
{ src = "https://github.com/echasnovski/mini.pick" },
|
|
{ src = "https://github.com/echasnovski/mini.icons" },
|
|
{ src = "https://github.com/echasnovski/mini.files" },
|
|
{ src = "https://github.com/echasnovski/mini.pairs" },
|
|
{ src = "https://github.com/echasnovski/mini.notify" },
|
|
{ src = "https://github.com/echasnovski/mini.surround" },
|
|
{ src = "https://github.com/echasnovski/mini.indentscope" },
|
|
{ src = "https://github.com/echasnovski/mini.fuzzy" },
|
|
{ src = "https://github.com/echasnovski/mini.tabline" },
|
|
{ src = "https://github.com/nvim-lualine/lualine.nvim" },
|
|
{ src = "https://github.com/folke/which-key.nvim" },
|
|
{ src = "https://github.com/L3MON4D3/LuaSnip" },
|
|
{ src = "https://github.com/neovim/nvim-lspconfig" },
|
|
{ src = "https://github.com/neoclide/coc.nvim" },
|
|
{ src = "https://github.com/fannheyward/coc-pyright" },
|
|
-- { src = "https://github.com/hrsh7th/nvim-cmp" },
|
|
-- { src = "https://github.com/hrsh7th/cmp-nvim-lsp" },
|
|
-- { src = "https://github.com/hrsh7th/cmp-buffer" },
|
|
-- { src = "https://github.com/hrsh7th/cmp-path" },
|
|
-- { src = "https://github.com/hrsh7th/cmp-cmdline" },
|
|
-- { src = "https://github.com/hrsh7th/cmp-nvim-lua" },
|
|
-- { src = "https://github.com/saadparwaiz1/cmp_luasnip" },
|
|
-- { src = "https://github.com/github/copilot.vim" },
|
|
-- { src = "https://github.com/jacob411/Ollama-Copilot" },
|
|
{ src = "https://github.com/pysan3/pathlib.nvim" },
|
|
{ src = "https://github.com/nvim-orgmode/org-bullets.nvim" },
|
|
{ src = "https://github.com/lukas-reineke/headlines.nvim" },
|
|
{ src = "https://github.com/michaelb/sniprun", run = "bash install.sh 1" },
|
|
{ src = "https://github.com/akinsho/toggleterm.nvim" },
|
|
{ src = "https://github.com/kdheepak/lazygit.nvim" },
|
|
{ src = "https://github.com/saecki/crates.nvim" },
|
|
{ src = "https://github.com/nvim-treesitter/nvim-treesitter" },
|
|
{ src = "https://github.com/folke/trouble.nvim" },
|
|
{ src = "https://github.com/folke/todo-comments.nvim" },
|
|
{ src = "https://github.com/MunifTanjim/nui.nvim" },
|
|
{ src = "https://github.com/huantrinh1802/m_taskwarrior_d.nvim" },
|
|
{ src = "https://github.com/rmagatti/auto-session" },
|
|
{ src = "https://github.com/romgrk/barbar.nvim" },
|
|
{ src = "https://github.com/christoomey/vim-tmux-navigator" },
|
|
{ src = "https://github.com/rachartier/tiny-inline-diagnostic.nvim" },
|
|
{ src = "https://github.com/zeioth/garbage-day.nvim" },
|
|
{ src = "https://github.com/ray-x/lsp_signature.nvim" },
|
|
{ src = "https://github.com/DNLHC/glance.nvim" },
|
|
{ src = "https://github.com/rmagatti/logger.nvim" },
|
|
{ src = "https://github.com/rmagatti/goto-preview" },
|
|
{ src = "https://github.com/nvim-lua/plenary.nvim" },
|
|
{ src = "https://github.com/nvim-telescope/telescope.nvim" },
|
|
{ src = "https://github.com/nvim-telescope/telescope-project.nvim"},
|
|
{ src = "https://github.com/nvim-telescope/telescope-ui-select.nvim" },
|
|
{ src = "https://github.com/luckasRanarison/nvim-devdocs" },
|
|
-- { src = "https://github.com/folke/noice.nvim" },
|
|
{ src = "https://github.com/mbbill/undotree.git" },
|
|
{ src = "https://github.com/francoiscabrol/ranger.vim" },
|
|
{ src = "https://github.com/folke/snacks.nvim" },
|
|
-- { src = "https://github.com/coder/claudecode.nvim" },
|
|
{ src = "https://github.com/yetone/avante.nvim" },
|
|
{ src = "https://github.com/alaviss/nim.nvim" },
|
|
{ src = "https://github.com/glebzlat/arduino-nvim" },
|
|
{ src = "https://github.com/norcalli/nvim-colorizer.lua" },
|
|
{ src = "https://github.com/HiPhish/rainbow-delimiters.nvim" },
|
|
{ src = "https://github.com/lewis6991/gitsigns.nvim" },
|
|
{ src = "https://github.com/amitds1997/remote-nvim.nvim" },
|
|
|
|
})
|
|
|
|
require('mini.icons').setup({})
|
|
require('mini.pick').setup({})
|
|
require('mini.pairs').setup({})
|
|
require('mini.notify').setup({})
|
|
require('mini.surround').setup({})
|
|
require('mini.indentscope').setup({})
|
|
require('mini.tabline').setup({})
|
|
require('mini.fuzzy').setup({})
|
|
-- require('lualine').setup({ options = { theme = 'tokyonight' } })
|
|
require('which-key').setup({})
|
|
require("snacks").setup({
|
|
explorer = { enabled = true },
|
|
image = { enabled = true },
|
|
input = { enabled = true },
|
|
picker = { enabled = true },
|
|
scope = { enabled = true },
|
|
notifier = { enabled = true },
|
|
quickfile = { enabled = true },
|
|
scroll = { enabled = true },
|
|
statuscolumn = { enabled = true },
|
|
})
|
|
require('fzf-lua').setup({
|
|
winopts = {
|
|
height = 0.85,
|
|
width = 0.80,
|
|
row = 0.35,
|
|
col = 0.50,
|
|
border = 'rounded',
|
|
preview = {
|
|
border = 'border',
|
|
wrap = 'nowrap',
|
|
hidden = 'nohidden',
|
|
vertical = 'down:45%',
|
|
horizontal = 'right:60%',
|
|
layout = 'flex',
|
|
flip_columns = 120,
|
|
},
|
|
},
|
|
keymap = {
|
|
builtin = {
|
|
["<F1>"] = "toggle-help",
|
|
["<F2>"] = "toggle-fullscreen",
|
|
["<F3>"] = "toggle-preview-wrap",
|
|
["<F4>"] = "toggle-preview",
|
|
["<F5>"] = "toggle-preview-ccw",
|
|
["<F6>"] = "toggle-preview-cw",
|
|
["<S-down>"] = "preview-page-down",
|
|
["<S-up>"] = "preview-page-up",
|
|
["<S-left>"] = "preview-page-reset",
|
|
},
|
|
fzf = {
|
|
["ctrl-z"] = "abort",
|
|
["ctrl-u"] = "unix-line-discard",
|
|
["ctrl-f"] = "half-page-down",
|
|
["ctrl-b"] = "half-page-up",
|
|
["ctrl-a"] = "beginning-of-line",
|
|
["ctrl-e"] = "end-of-line",
|
|
["alt-a"] = "toggle-all",
|
|
["f3"] = "toggle-preview-wrap",
|
|
["f4"] = "toggle-preview",
|
|
["shift-down"] = "preview-page-down",
|
|
["shift-up"] = "preview-page-up",
|
|
},
|
|
},
|
|
previewers = {
|
|
head = {
|
|
cmd = "head",
|
|
args = nil,
|
|
},
|
|
git_diff = {
|
|
cmd_deleted = "git show HEAD --",
|
|
cmd_modified = "git diff HEAD",
|
|
cmd_untracked = "git diff --no-index /dev/null",
|
|
},
|
|
},
|
|
})
|
|
require('crates').setup({})
|
|
require('todo-comments').setup({
|
|
options = {
|
|
keywords = {
|
|
FIX = {
|
|
icon = " ", -- icon used for the sign, and in search results
|
|
color = "error", -- can be a hex color, or a named color (see below)
|
|
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
|
|
-- signs = false, -- configure signs for some keywords individually
|
|
},
|
|
TODO = { icon = " ", color = "info" },
|
|
HACK = { icon = " ", color = "warning" },
|
|
WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } },
|
|
PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
|
|
NOTE = { icon = " ", color = "hint", alt = { "INFO" } },
|
|
TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
|
|
},
|
|
}
|
|
})
|
|
require('trouble').setup({})
|
|
require('org-bullets').setup({})
|
|
require('headlines').setup({})
|
|
require('sniprun').setup({
|
|
binary_path = '/home/th3r00t/.local/share/nvim/site/pack/core/opt/sniprun/\
|
|
target/release/sniprun'
|
|
})
|
|
require('toggleterm').setup({
|
|
size = 20,
|
|
open_mapping = [[<c- >]],
|
|
hide_numbers = true,
|
|
shade_filetypes = {},
|
|
shading_factor = 2,
|
|
start_in_insert = true,
|
|
insert_mappings = true,
|
|
persist_size = true,
|
|
direction = 'horizontal',
|
|
close_on_exit = true,
|
|
shell = vim.o.shell,
|
|
})
|
|
require('m_taskwarrior_d').setup({})
|
|
require("auto-session").setup({
|
|
suppressed_dirs = { "~/Downloads", "~/Documents", "~/Projects", "~/" },
|
|
})
|
|
require('barbar').setup({})
|
|
require('goto-preview').setup({ default_mappings = true })
|
|
require('telescope').setup({})
|
|
require('nvim-devdocs').setup({})
|
|
-- require('noice').setup({
|
|
-- lsp = {
|
|
-- override = {
|
|
-- ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
|
-- ["vim.lsp.util.stylize_markdown"] = true,
|
|
-- ["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
|
|
-- },
|
|
-- },
|
|
-- presets = {
|
|
-- bottom_search = true, -- use a classic bottom cmdline for search
|
|
-- command_palette = true, -- position the cmdline and popupmenu together
|
|
-- long_message_to_split = true, -- long messages will be sent to a split
|
|
-- inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
|
-- lsp_doc_border = false, -- add a border to hover docs and signature help
|
|
-- },
|
|
-- routes = {
|
|
-- view = "notify",
|
|
-- filter = { event = "msg_showmode" },
|
|
-- },
|
|
-- })
|
|
-- require("claudecode").setup({})
|
|
|
|
require('arduino-nvim').setup({
|
|
default_fqbn = "esp32:esp32:esp32",
|
|
filetypes = {"arduino"}
|
|
})
|
|
require('colorizer').setup({
|
|
'*',
|
|
}, {
|
|
RGB = true,
|
|
RRGGBB = true,
|
|
names = true,
|
|
RRGGBBAA = true,
|
|
rgb_fn = true,
|
|
hsl_fn = true,
|
|
css = true,
|
|
css_fn = true,
|
|
mode = 'background',
|
|
})
|
|
require('gitsigns').setup({
|
|
signs = {
|
|
add = { text = '┃' },
|
|
change = { text = '┃' },
|
|
delete = { text = '_' },
|
|
topdelete = { text = '‾' },
|
|
changedelete = { text = '~' },
|
|
untracked = { text = '┆' },
|
|
},
|
|
signs_staged = {
|
|
add = { text = '┃' },
|
|
change = { text = '┃' },
|
|
delete = { text = '_' },
|
|
topdelete = { text = '‾' },
|
|
changedelete = { text = '~' },
|
|
untracked = { text = '┆' },
|
|
},
|
|
signs_staged_enable = true,
|
|
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
|
|
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
|
|
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
|
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
|
watch_gitdir = {
|
|
follow_files = true
|
|
},
|
|
auto_attach = true,
|
|
attach_to_untracked = false,
|
|
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
|
current_line_blame_opts = {
|
|
virt_text = true,
|
|
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
|
delay = 1000,
|
|
ignore_whitespace = false,
|
|
virt_text_priority = 100,
|
|
use_focus = true,
|
|
},
|
|
current_line_blame_formatter = '<author>, <author_time:%R> - <summary>',
|
|
sign_priority = 6,
|
|
update_debounce = 100,
|
|
status_formatter = nil, -- Use default
|
|
max_file_length = 40000, -- Disable if file is longer than this (in lines)
|
|
preview_config = {
|
|
-- Options passed to nvim_open_win
|
|
style = 'minimal',
|
|
relative = 'cursor',
|
|
row = 0,
|
|
col = 1
|
|
},
|
|
})
|
|
require("remote-nvim").setup({
|
|
-- Configuration for devpod connections
|
|
devpod = {
|
|
binary = "devpod", -- Binary to use for devpod
|
|
docker_binary = "docker", -- Binary to use for docker-related commands
|
|
---@diagnostic disable-next-line:param-type-mismatch
|
|
-- ssh_config_path = utils.path_join(utils.is_windows, vim.fn.stdpath("data"), constants.PLUGIN_NAME, "ssh_config"), -- Path where devpod SSH configurations should be stored
|
|
search_style = "current_dir_only", -- How should devcontainers be searched
|
|
-- For dotfiles, see https://devpod.sh/docs/developing-in-workspaces/dotfiles-in-a-workspace for more information
|
|
dotfiles = {
|
|
path = nil, -- Path to your dotfiles which should be copied into devcontainers
|
|
install_script = nil -- Install script that should be called to install your dotfiles
|
|
},
|
|
gpg_agent_forwarding = false, -- Should GPG agent be forwarded over the network
|
|
container_list = "running_only", -- How should docker list containers ("running_only" or "all")
|
|
},
|
|
-- Configuration for SSH connections
|
|
ssh_config = {
|
|
ssh_binary = "ssh", -- Binary to use for running SSH command
|
|
scp_binary = "scp", -- Binary to use for running SSH copy commands
|
|
ssh_config_file_paths = { "$HOME/.ssh/config" }, -- Which files should be considered to contain the ssh host configurations. NOTE: `Include` is respected in the provided files.
|
|
|
|
-- These are useful for password-based SSH authentication.
|
|
-- It provides parsing pattern for the plugin to detect that an input is requested.
|
|
-- Each element contains the following attributes:
|
|
-- match - The string to match (plain matching is done)
|
|
-- type - Supports two values "plain"|"secret". Secret means when you provide the value, it should not be stored in the completion history of Neovim.
|
|
-- value - Default value for the prompt
|
|
-- value_type - "static"|"dynamic". For things like password, it would be needed for each new connection that the plugin initiates which could be obtrusive.
|
|
-- So, we save the value (only for current session's interval) to ease the process. If set to "dynamic", we do not save the value even for the session. You have to provide a fresh value each time.
|
|
ssh_prompts = {
|
|
{
|
|
match = "password:",
|
|
type = "secret",
|
|
value_type = "static",
|
|
value = "",
|
|
},
|
|
{
|
|
match = "continue connecting (yes/no/[fingerprint])?",
|
|
type = "plain",
|
|
value_type = "static",
|
|
value = "",
|
|
},
|
|
-- There are other values here which can be checked in lua/remote-nvim/init.lua
|
|
},
|
|
},
|
|
|
|
-- Path to the script that would be copied to the remote and called to ensure that neovim gets installed.
|
|
-- Default path is to the plugin's own ./scripts/neovim_install.sh file.
|
|
-- neovim_install_script_path = utils.path_join(
|
|
-- utils.is_windows,
|
|
-- vim.fn.fnamemodify(debug.getinfo(1).source:sub(2), ":h:h:h"),
|
|
-- "scripts",
|
|
-- "neovim_install.sh"
|
|
-- ),
|
|
|
|
-- Modify the UI for the plugin's progress viewer.
|
|
-- type can be "split" or "popup". All options from https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup and https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/split are supported.
|
|
-- Note that some options like "border" are only available for "popup".
|
|
progress_view = {
|
|
type = "popup",
|
|
},
|
|
|
|
|
|
-- Offline mode configuration. For more details, see the "Offline mode" section below.
|
|
offline_mode = {
|
|
-- Should offline mode be enabled?
|
|
enabled = false,
|
|
-- Do not connect to GitHub at all. Not even to get release information.
|
|
no_github = false,
|
|
-- What path should be looked at to find locally available releases
|
|
-- cache_dir = utils.path_join(utils.is_windows, vim.fn.stdpath("cache"), constants.PLUGIN_NAME, "version_cache"),
|
|
},
|
|
|
|
-- Remote configuration
|
|
remote = {
|
|
app_name = "nvim", -- This directly maps to the value NVIM_APPNAME. If you use any other paths for configuration, also make sure to set this.
|
|
-- List of directories that should be copied over
|
|
copy_dirs = {
|
|
-- What to copy to remote's Neovim config directory
|
|
config = {
|
|
base = vim.fn.stdpath("config"), -- Path from where data has to be copied
|
|
dirs = "*", -- Directories that should be copied over. "*" means all directories. To specify a subset, use a list like {"lazy", "mason"} where "lazy", "mason" are subdirectories
|
|
-- under path specified in `base`.
|
|
compression = {
|
|
enabled = false, -- Should compression be enabled or not
|
|
additional_opts = {} -- Any additional options that should be used for compression. Any argument that is passed to `tar` (for compression) can be passed here as separate elements.
|
|
},
|
|
},
|
|
-- What to copy to remote's Neovim data directory
|
|
data = {
|
|
base = vim.fn.stdpath("data"),
|
|
dirs = {},
|
|
compression = {
|
|
enabled = true,
|
|
},
|
|
},
|
|
-- What to copy to remote's Neovim cache directory
|
|
cache = {
|
|
base = vim.fn.stdpath("cache"),
|
|
dirs = {},
|
|
compression = {
|
|
enabled = true,
|
|
},
|
|
},
|
|
-- What to copy to remote's Neovim state directory
|
|
state = {
|
|
base = vim.fn.stdpath("state"),
|
|
dirs = {},
|
|
compression = {
|
|
enabled = true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
-- You can supply your own callback that should be called to create the local client. This is the default implementation.
|
|
-- Two arguments are passed to the callback:
|
|
-- port: Local port at which the remote server is available
|
|
-- workspace_config: Workspace configuration for the host. For all the properties available, see https://github.com/amitds1997/remote-nvim.nvim/blob/main/lua/remote-nvim/providers/provider.lua#L4
|
|
-- A sample implementation using WezTerm tab is at: https://github.com/amitds1997/remote-nvim.nvim/wiki/Configuration-recipes
|
|
client_callback = function(port, _)
|
|
require("remote-nvim.ui").float_term(("nvim --server localhost:%s --remote-ui"):format(port), function(exit_code)
|
|
if exit_code ~= 0 then
|
|
vim.notify(("Local client failed with exit code %s"):format(exit_code), vim.log.levels.ERROR)
|
|
end
|
|
end)
|
|
end,
|
|
|
|
-- Plugin log related configuration [PREFER NOT TO CHANGE THIS]
|
|
log = {
|
|
-- Where is the log file
|
|
-- filepath = utils.path_join(utils.is_windows, vim.fn.stdpath("state"), ("%s.log"):format(constants.PLUGIN_NAME)),
|
|
-- Level of logging
|
|
level = "info",
|
|
-- At what size, should we truncate the logs
|
|
max_size = 1024 * 1024 * 2, -- 2MB
|
|
},
|
|
})
|