Now works with Fedora

This commit is contained in:
2024-06-09 04:16:43 -05:00
parent e37dd1be84
commit 314e5c9b8b
662 changed files with 128036 additions and 1568 deletions

View File

@ -0,0 +1,19 @@
-- Move to previous/next
vim.keymap.set("n", "<C-h>", "<Cmd>BufferPrevious<CR>")
vim.keymap.set("n", "<C-l>", "<Cmd>BufferNext<CR>")
-- Re-order to previous/next
vim.keymap.set("n", "<C-j>", "<Cmd>BufferMovePrevious<CR>")
vim.keymap.set("n", "<C-k>", "<Cmd>BufferMoveNext<CR>")
-- Goto buffer in position...
vim.keymap.set("n", "<leader>1", "<Cmd>BufferGoto 1<CR>")
vim.keymap.set("n", "<leader>2", "<Cmd>BufferGoto 2<CR>")
vim.keymap.set("n", "<leader>3", "<Cmd>BufferGoto 3<CR>")
vim.keymap.set("n", "<leader>4", "<Cmd>BufferGoto 4<CR>")
vim.keymap.set("n", "<leader>5", "<Cmd>BufferGoto 5<CR>")
vim.keymap.set("n", "<leader>6", "<Cmd>BufferGoto 6<CR>")
vim.keymap.set("n", "<leader>7", "<Cmd>BufferGoto 7<CR>")
vim.keymap.set("n", "<leader>8", "<Cmd>BufferGoto 8<CR>")
vim.keymap.set("n", "<leader>9", "<Cmd>BufferGoto 9<CR>")
vim.keymap.set("n", "<leader>0", "<Cmd>BufferLast<CR>")
vim.keymap.set("n", "<C-q>", "<Cmd>BufferClose<CR>")
vim.keymap.set("n", "<C-a>", "<Cmd>BufferCloseAllButCurrent<CR>")

View File

@ -0,0 +1,22 @@
require("cloak").setup({
enabled = true,
cloak_character = "*",
-- The applied highlight group (colors) on the cloaking, see `:h highlight`.
highlight_group = "Comment",
patterns = {
{
-- Match any file starting with ".env".
-- This can be a table to match multiple file patterns.
file_pattern = {
".env*",
"wrangler.toml",
".dev.vars",
},
-- Match an equals sign and any character after it.
-- This can also be a table of patterns to cloak,
-- example: cloak_pattern = { ":.+", "-.+" } for yaml files.
cloak_pattern = "=.+"
},
},
})

View File

@ -0,0 +1,24 @@
require("tokyonight").setup({
-- your configuration comes here
-- or leave it empty to use the default settings
style = "moon", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day`
light_style = "day", -- The theme is used when the background is set to light
transparent = true, -- Enable this to disable setting the background color
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in [Neovim](https://github.com/neovim/neovim)
styles = {
-- Style to be applied to different syntax groups
-- Value is any valid attr-list value for `:help nvim_set_hl`
comments = { italic = true },
keywords = { italic = true },
functions = {},
variables = {},
-- Background styles. Can be "dark", "transparent" or "normal"
sidebars = "dark", -- style for sidebars, see below
floats = "dark", -- style for floating windows
},
sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]`
day_brightness = 0.3, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors
hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**.
dim_inactive = false, -- dims inactive windows
lualine_bold = false, -- When `true`, section headers in the lualine theme will be bold
})

View File

@ -0,0 +1,35 @@
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
local gib_nvim_Fugitive = vim.api.nvim_create_augroup("gib_nvim_Fugitive", {})
local autocmd = vim.api.nvim_create_autocmd
autocmd("BufWinEnter", {
group = gib_nvim_Fugitive,
pattern = "*",
callback = function()
if vim.bo.ft ~= "fugitive" then
return
end
local bufnr = vim.api.nvim_get_current_buf()
local opts = {buffer = bufnr, remap = false}
vim.keymap.set("n", "<leader>gp", function()
vim.cmd.Git('push')
end, opts)
-- rebase always
vim.keymap.set("n", "<leader>gP", function()
vim.cmd.Git({'pull', '--rebase'})
end, opts)
-- Git commit
vim.keymap.set("n", "<leader>gc", function()
local message = vim.fn.input('Commit message: ')
vim.cmd('Git commit -m "' .. message .. '"')
end, opts)
-- NOTE: It allows me to easily set the branch i am pushing and any tracking
-- needed if i did not set the branch up correctly
vim.keymap.set("n", "<leader>gt", ":Git push -u origin ", opts);
end,
})

View File

@ -0,0 +1,11 @@
--local mark = require("harpoon.mark")
--local ui = require("harpoon.ui")
--vim.keymap.set("n", "<leader>ha", mark.add_file)
--vim.keymap.set("n", "<leader>hh", ui.toggle_quick_menu)
--vim.keymap.set("n", "<leader>h1", function() ui.nav_file(1) end)
--vim.keymap.set("n", "<leader>h2", function() ui.nav_file(2) end)
--vim.keymap.set("n", "<leader>h3", function() ui.nav_file(3) end)
--vim.keymap.set("n", "<leader>h4", function() ui.nav_file(4) end)

View File

@ -0,0 +1,18 @@
require("gib_nvim.lazy")
require("gib_nvim.remap")
require("gib_nvim.set")
require("gib_nvim.colors")
require("gib_nvim.cloak")
require("gib_nvim.fugitive")
--require("gib_nvim.harpoon")
require("gib_nvim.lsp")
require("gib_nvim.lualine")
require("gib_nvim.neotree")
require("gib_nvim.nerdcomments")
require("gib_nvim.refactoring")
require("gib_nvim.telescope")
require("gib_nvim.treesitter")
require("gib_nvim.trouble")
require("gib_nvim.undotree")
require("gib_nvim.barbar")
require("gib_nvim.toggleterm")

View File

@ -0,0 +1,122 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
{
'nvim-telescope/telescope.nvim', tag = '0.1.5',
dependencies = { 'nvim-lua/plenary.nvim' }
},
{
'folke/tokyonight.nvim',
priority = 1000,
},
{
'folke/trouble.nvim', dependencies =
{ 'nvim-tree/nvim-web-devicons' }
},
{
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate'
},
{
'nvim-treesitter/playground'
},
{
'nvim-treesitter/nvim-treesitter-context'
},
--{
--'theprimeagen/harpoon'
--},
{
"ThePrimeagen/refactoring.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
}
},
{
'mbbill/undotree'
},
{
'tpope/vim-fugitive'
},
{
'VonHeikemen/lsp-zero.nvim', branch = 'v3.x'
},
{'williamboman/mason.nvim'},
{'williamboman/mason-lspconfig.nvim'},
{'neovim/nvim-lspconfig'},
{'hrsh7th/cmp-nvim-lsp'},
{'hrsh7th/nvim-cmp'},
{'hrsh7th/cmp-path'},
{'hrsh7th/cmp-buffer'},
{'hrsh7th/cmp-nvim-lua'},
{'L3MON4D3/LuaSnip'},
{'saadparwaiz1/cmp_luasnip'},
{'rafamadriz/friendly-snippets'},
{
'github/copilot.vim'
},
{
'laytan/cloak.nvim'
},
{
'nvim-lualine/lualine.nvim',
dependencies = {
'nvim-tree/nvim-web-devicons',
'folke/tokyonight.nvim',
}
},
{
'scrooloose/nerdcommenter'
},
{
'nvim-neo-tree/neo-tree.nvim', branch = 'v3.x',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-tree/nvim-web-devicons',
'MunifTanjim/nui.nvim',
'3rd/image.nvim',
{
's1n7ax/nvim-window-picker', version = '2.*',
config = function()
require 'window-picker'.setup({
filter_rules = {
include_current_win = false,
autoselect_one = true,
bo = {
filetype = { 'neo-tree', "neo-tree-popup", "notify" },
buftype = { 'terminal', "quickfix" },
},
},
})
end,
},
},
},
{
'romgrk/barbar.nvim', dependencies = {
'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status
'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons
},
init = function() vim.g.barbar_auto_setup = false end,
opts = {
animation = true,
insert_at_start = true,
},
version = '^1.0.0',
},
{
'akinsho/toggleterm.nvim', version = "*", config = true
},
})

View File

@ -0,0 +1,74 @@
local lsp_zero = require('lsp-zero')
lsp_zero.on_attach(function(client, bufnr)
local opts = {buffer = bufnr, remap = false}
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
vim.keymap.set("n", "<leader>H", function() vim.lsp.buf.hover() end, opts)
vim.keymap.set("n", "<leader>kw", function() vim.lsp.buf.workspace_symbol() end, opts)
vim.keymap.set("n", "<leader>kd", function() vim.diagnostic.open_float() end, opts)
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts)
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
vim.keymap.set("n", "<leader>ka", function() vim.lsp.buf.code_action() end, opts)
vim.keymap.set("n", "<leader>re", function() vim.lsp.buf.references() end, opts)
vim.keymap.set("n", "<leader>rn", function() vim.lsp.buf.rename() end, opts)
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
end)
require('mason').setup({})
require('mason-lspconfig').setup({
ensure_installed = {
'asm_lsp',
'bashls',
'clangd',
'cmake',
'cssls',
'csharp_ls',
'cssmodules_ls',
'docker_compose_language_service',
'dockerls',
'eslint',
'graphql',
'intelephense',
'jsonls',
'kotlin_language_server',
'lua_ls',
'pyright',
'rust_analyzer',
'sqlls',
'svelte',
'tailwindcss',
'tsserver',
'yamlls',
'vimls',
},
handlers = {
lsp_zero.default_setup,
lua_ls = function()
local lua_opts = lsp_zero.nvim_lua_ls()
require('lspconfig').lua_ls.setup(lua_opts)
end,
}
})
local cmp = require('cmp')
local cmp_select = {behavior = cmp.SelectBehavior.Select}
cmp.setup({
sources = {
{name = 'path'},
{name = 'nvim_lsp'},
{name = 'nvim_lua'},
{name = 'luasnip', keyword_length = 2},
{name = 'buffer', keyword_length = 3},
},
formatting = lsp_zero.cmp_format(),
mapping = cmp.mapping.preset.insert({
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
['<C-y>'] = cmp.mapping.confirm({ select = true }),
['<C-Space>'] = cmp.mapping.complete(),
}),
})
lsp_zero.setup()

View File

@ -0,0 +1,40 @@
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'tokyonight',
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
}

View File

@ -0,0 +1,276 @@
vim.keymap.set({'n','v'}, '<leader>t', '<Cmd>Neotree toggle<CR>')
vim.keymap.set({'n', 'v'}, '<leader>h', '<C-w>h')
vim.keymap.set({'n', 'v'}, '<leader>l', '<C-w>l')
vim.keymap.set({'n', 'v'}, '<leader>T', '<Cmd>Neotree focus<CR>')
-- 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 = true, -- Close Neo-tree if it is the last window left in the tab
popup_border_style = "rounded",
enable_git_status = true,
enable_diagnostics = true,
--enable_normal_mode_for_inputs = false, -- Enable normal mode for input dialogs.
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 ,
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 = "󰜌",
-- 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 = 35,
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",
},
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 },
},
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",
},
},
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 },
}
}
}
})

View File

@ -0,0 +1,2 @@
-- Toggle Comments in Visual/Normal Mode
vim.keymap.set({"n", "v"}, "<leader>c", "<plug>NERDCommenterToggle")

View File

@ -0,0 +1,3 @@
require('refactoring').setup({})
vim.api.nvim_set_keymap("v", "<leader>rf", [[ <Esc><Cmd>lua require('refactoring').refactor('Inline Variable')<CR>]], {noremap = true, silent = true, expr = false})

View File

@ -0,0 +1,75 @@
-- Remaps
---------------------------------------------
-- Set leader to space
vim.g.mapleader = " "
-- Easily get back to Normal mode.
vim.keymap.set("i", "<C-c>", "<Esc>")
-- Move the selected lines up or down one line and reselect
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
-- Join the current line with the line below and reposition the cursor
vim.keymap.set("n", "J", "mzJ`z")
-- Scroll down or up and reposition the cursor
vim.keymap.set("n", "<C-d>", "<C-d>zz")
vim.keymap.set("n", "<C-u>", "<C-u>zz")
-- Search forward and reposition the cursor
vim.keymap.set("n", "n", "nzzzv")
-- Search backward and reposition the cursor
vim.keymap.set("n", "N", "Nzzzv")
-- Paste the selection from the system clipboard
vim.keymap.set({"n", "v"}, "<leader>v", [["+p]])
vim.keymap.set({"n", "v"}, "<leader>V", [["+P]])
-- Move selected text to the black hole register & replace with copied text.
vim.keymap.set("x", "<leader>p", [["_dP]])
-- Yank (copy) the selection to the system clipboard
vim.keymap.set({"n", "v"}, "<leader>y", [["+y]])
-- Yank (copy) the entire buffer to the system clipboard
vim.keymap.set("n", "<leader>Y", [["+Y]])
-- Yank all the text in the file to the system clipboard
vim.keymap.set("n", "<leader>YY", "gg\"+yG")
-- Delete the selection without yanking (copying) it
vim.keymap.set({"n", "v"}, "<leader>d", [["_d]])
-- Delete the line without yanking (copying) it
vim.keymap.set("n", "<leader>dd", [["_dd]])
-- Map Q in Normal mode to do nothing (nop)
vim.keymap.set("n", "Q", "<nop>")
-- Format the current buffer using the language server protocol (LSP)
vim.keymap.set("n", "<leader>kf", vim.lsp.buf.format)
-- Perform a search and replace operation using the word under the cursor
vim.keymap.set("n", "<leader>sr", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
-- Make the current file executable (chmod +x)
vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true })
-- Source the current file
vim.keymap.set("n", "<leader><leader>", vim.cmd.so)
-- Jump to the next location in the quickfix list and reposition the cursor
-- vim.keymap.set("n", "<C-k>", "<cmd>cnext<CR>zz")
-- Jump to the previous location in the quickfix list and reposition the cursor
-- vim.keymap.set("n", "<C-j>", "<cmd>cprev<CR>zz")
-- Jump to the next location in the location list and reposition the cursor
--vim.keymap.set("n", "<leader>k", "<cmd>lnext<CR>zz")
-- Jump to the previous location in the location list and reposition the cursor
--vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz")

View File

@ -0,0 +1,31 @@
vim.opt.nu = true
vim.opt.relativenumber = true
vim.opt.tabstop = 2
vim.opt.softtabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true
vim.opt.smartindent = true
vim.opt.wrap = true
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
vim.opt.undofile = true
vim.opt.hlsearch = false
vim.opt.incsearch = true
vim.opt.termguicolors = true
vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes"
vim.opt.isfname:append("@-@")
vim.opt.updatetime = 50
vim.opt.colorcolumn = "90"
vim.o.background = "dark" -- or "light" for light mode
vim.cmd([[colorscheme tokyonight-moon]])

View File

@ -0,0 +1,14 @@
local telescope = require('telescope')
local builtin = require('telescope.builtin')
telescope.setup{
defaults = {
file_ignore_patterns = {"node_modules", ".git", ".cache", ".DS_Store", "Steam", "Media", "Pictures", "Downloads", "Videos", "Music", ".venv", ".conda", "School"},
},
}
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.git_files, {})
vim.keymap.set('n', '<leader>fs', function()
builtin.grep_string({ search = vim.fn.input("Grep > ") })
end)

View File

@ -0,0 +1,29 @@
require("toggleterm").setup{
size = 10,
open_mapping = [[<C-x>]],
shade_filetypes = {},
shade_terminals = true,
shading_factor = 1, -- the degree by which to darken to terminal colour, default: 1 for dark backgrounds, 3 for light
start_in_insert = true,
insert_mappings = true,
persist_size = true,
direction = 'horizontal',
close_on_exit = true, -- close the terminal window when the process exits
shell = vim.o.shell, -- change the default shell
-- this field is only relevant if direction is set to 'float'
float_opts = {
-- the border key is *almost* the same as 'nvim_win_open'
-- see :h nvim_win_open for details on borders however
-- the 'curved' border is a custom border type
-- not natively supported but implemented in this plugin.
border = 'single',
width = 200,
height = 50,
winblend = 3,
highlights = {
border = "normal",
background = "normal",
}
}
}

View File

@ -0,0 +1,22 @@
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all"
ensure_installed = { "bash", "c", "c_sharp", "cmake", "cpp", "css", "dockerfile", "git_config", "git_rebase", "gitattributes", "gitcommit", "gitignore", "haskell", "html", "java", "javascript", "jq", "json", "kotlin", "lua", "make", "matlab", "php", "python", "rust", "scala", "sql", "svelte", "swift", "typescript", "vimdoc", "yaml", "zig" },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,
highlight = {
-- `false` will disable the whole extension
enable = true,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
}

View File

@ -0,0 +1,3 @@
vim.keymap.set("n", "<leader>xq", "<cmd>TroubleToggle quickfix<cr>",
{silent = true, noremap = true}
)

View File

@ -0,0 +1 @@
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)