diff --git a/.config/fish/alias.fish b/.config/fish/alias.fish index 5fbd36d..7633a30 100644 --- a/.config/fish/alias.fish +++ b/.config/fish/alias.fish @@ -1,79 +1,111 @@ # Git -alias g "git" -alias gc "git clone" -alias gd "git diff --ignore-space-at-eol" -alias gl "git log --oneline" -alias gp "git pull" -alias gs "git status" +if command -q git + alias g "git" + alias gc "git clone" + alias gd "git diff --ignore-space-at-eol" + alias gl "git log --oneline" + alias gp "git pull" + alias gs "git status" + alias home "git --git-dir=$HOME/.home/ --work-tree=$HOME" + alias homeinit "git clone --bare https://git.urbach.dev/sys/home $HOME/.home && home checkout" + alias h "home" + alias hs "home status" + alias hd "home diff --ignore-space-at-eol" + alias hp "home pull" +end # Go -alias gb "go build -v" -alias godeps "go list -f '{{ join .Deps \"\n\"}}' ." -alias gt "go test -v" -alias gts "gotestsum" - -# Home -alias home "git --git-dir=$HOME/.home/ --work-tree=$HOME" -alias homeinit "git clone --bare https://git.urbach.dev/sys/home $HOME/.home && home checkout" -alias h "home" -alias hs "home status" -alias hd "home diff --ignore-space-at-eol" -alias hp "home pull" +if command -q go + alias gb "go build -v" + alias godeps "go list -f '{{ join .Deps \"\n\"}}' ." + alias gt "go test -v" + alias gts "gotestsum" +end # Hyperfine -alias bench "hyperfine --shell=none" +if command -q hyperfine + alias bench "hyperfine --shell=none" +end # Kernel -alias kerr "sudo dmesg --level=emerg,alert,crit,err" -alias klog "sudo dmesg" +if command -q dmesg + alias kerr "sudo dmesg --level=emerg,alert,crit,err" + alias klog "sudo dmesg" +end # List -alias l "ls" -alias ll "ls -l" -alias l2 "ls -T -L2" -alias lu "ls -l --total-size --sort=size --reverse --no-permissions --no-user --no-time" -alias lp "ls -l --no-filesize --no-time" +if command -q ls + alias l "ls" + alias ll "ls -l" + alias l2 "ls -T -L2" + alias lu "ls -l --total-size --sort=size --reverse --no-permissions --no-user --no-time" + alias lp "ls -l --no-filesize --no-time" +end # Lsof -alias tcp "lsof -PniTCP" -alias udp "lsof -PniUDP" +if command -q lsof + alias tcp "lsof -PniTCP" + alias udp "lsof -PniUDP" +end # Neovim -alias e "nvim" -alias n "nvim" +if command -q nvim + alias e "nvim" + alias n "nvim" +end # Pacman -alias p "pacman" -alias pi "sudo pacman -S" -alias pr "sudo pacman -Rs" -alias pu "sudo pacman -Syu" -alias pl "pacman -Qq" -alias pe "pacman -Qe" -alias pc "sudo pacman -Sc" -alias paur "pacman -Qm" -alias pfiles "pacman -Ql" -alias porphan "pacman -Qtdq" -alias powner "pacman -Qo" +if command -q apk + alias p "apk" + alias pi "sudo apk add" + alias pr "sudo apk del" + alias pu "sudo apk update" + alias pl "apk info" + alias powner "apk info --who-owns" +else if command -q pacman + alias p "pacman" + alias pi "sudo pacman -S" + alias pr "sudo pacman -Rs" + alias pu "sudo pacman -Syu" + alias pl "pacman -Qq" + alias pe "pacman -Qe" + alias pc "sudo pacman -Sc" + alias paur "pacman -Qm" + alias pfiles "pacman -Ql" + alias porphan "pacman -Qtdq" + alias powner "pacman -Qo" +end + +# Sudo +if command -q doas + alias sudo "doas" +end # Systemctl -alias start "sudo systemctl start" -alias stop "sudo systemctl stop" -alias enable "sudo systemctl enable" -alias disable "sudo systemctl disable" -alias restart "sudo systemctl restart" -alias running "systemctl list-units --type=service --state=running" -alias disabled "systemctl list-unit-files --type=service --state=disabled" -alias enabled "systemctl list-unit-files --type=service --state=enabled" -alias timers "systemctl list-timers" +if command -q service + alias services "service -l" +else if command -q systemctl + alias start "sudo systemctl start" + alias stop "sudo systemctl stop" + alias enable "sudo systemctl enable" + alias disable "sudo systemctl disable" + alias restart "sudo systemctl restart" + alias running "systemctl list-units --type=service --state=running" + alias disabled "systemctl list-unit-files --type=service --state=disabled" + alias enabled "systemctl list-unit-files --type=service --state=enabled" + alias timers "systemctl list-timers" + alias bios "systemctl reboot --firmware-setup" +end # Tmux -alias ta "tmux attach" -alias td "tmux detach" -alias tl "tmux ls" -alias tk "tmux kill-server" +if command -q tmux + alias ta "tmux attach" + alias td "tmux detach" + alias tl "tmux ls" + alias tk "tmux kill-server" +end # ... -alias bios "systemctl reboot --firmware-setup" alias cfg "config" alias cls "clear" alias debug "blinkenlights" diff --git a/.config/fish/config.fish b/.config/fish/config.fish index e40a6f1..284069c 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -3,10 +3,10 @@ if status is-interactive source $HOME/.config/fish/alias.fish end -# PATH: Add scripts +# Add scripts to PATH fish_add_path $XDG_CONFIG_HOME/fish/scripts -# PATH: Add Go binaries +# Add Go binaries to PATH if command -q go fish_add_path (go env GOPATH)/bin end diff --git a/.config/fish/functions/config.fish b/.config/fish/functions/config.fish index 85d8819..0fb4829 100644 --- a/.config/fish/functions/config.fish +++ b/.config/fish/functions/config.fish @@ -1,3 +1,3 @@ function config - $EDITOR $HOME/.config/$argv + f $HOME/.config/$argv end diff --git a/.config/fish/functions/f.fish b/.config/fish/functions/f.fish index 651a4af..bfde20b 100644 --- a/.config/fish/functions/f.fish +++ b/.config/fish/functions/f.fish @@ -1,8 +1,19 @@ -function f - set tmp (mktemp -t "yazi-cwd.XXXXXX") - yazi $argv --cwd-file="$tmp" - if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] - builtin cd -- "$cwd" +function f --wraps nnn --description 'support nnn quit and change directory' + if test -n "$NNNLVL" -a "$NNNLVL" -ge 1 + echo "nnn is already running" + return + end + + if test -n "$XDG_CONFIG_HOME" + set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd" + else + set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd" + end + + command nnn $argv + + if test -e $NNN_TMPFILE + source $NNN_TMPFILE + rm -- $NNN_TMPFILE end - rm -f -- "$tmp" end \ No newline at end of file diff --git a/.config/fish/functions/ls.fish b/.config/fish/functions/ls.fish index 81daf1e..b407316 100644 --- a/.config/fish/functions/ls.fish +++ b/.config/fish/functions/ls.fish @@ -1,4 +1,4 @@ -function ls +function ls --wraps eza if command -q eza eza --group-directories-first --time-style relative -T -L1 $argv else diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 13fa7bf..464f3c0 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,6 +1,6 @@ +require("boot") require("settings") require("lsp") -require("packages") require("keys") require("autocmds") require("usercmds") \ No newline at end of file diff --git a/.config/nvim/lua/autocmds.lua b/.config/nvim/lua/autocmds.lua index 6cced5c..d842f3c 100644 --- a/.config/nvim/lua/autocmds.lua +++ b/.config/nvim/lua/autocmds.lua @@ -64,7 +64,7 @@ on({ "VimEnter" }, { end if is_directory ~= 0 then - require("telescope.builtin").find_files() + --require("telescope.builtin").find_files() end end, }) \ No newline at end of file diff --git a/.config/nvim/lua/boot.lua b/.config/nvim/lua/boot.lua new file mode 100644 index 0000000..43ad75d --- /dev/null +++ b/.config/nvim/lua/boot.lua @@ -0,0 +1,46 @@ +-- Disable providers +local disabled_providers = { + "node", + "perl", + "python3", + "ruby", +} + +for _, provider in ipairs(disabled_providers) do + vim.g["loaded_" .. provider .. "_provider"] = 0 +end + +-- Disable plugins +local disabled_plugins = { + "2html_plugin", + "tohtml", + "getscript", + "getscriptPlugin", + "gzip", + "logipat", + "netrw", + "netrwPlugin", + "netrwSettings", + "netrwFileHandlers", + "matchit", + "tar", + "tarPlugin", + "rrhelper", + "spellfile_plugin", + "vimball", + "vimballPlugin", + "zip", + "zipPlugin", + "tutor", + "rplugin", + "syntax", + "synmenu", + "optwin", + "compiler", + "bugreport", + "ftplugin", +} + +for _, plugin in ipairs(disabled_plugins) do + vim.g["loaded_" .. plugin] = 1 +end \ No newline at end of file diff --git a/.config/nvim/lua/disabled/cmp.lua b/.config/nvim/lua/disabled/cmp.lua deleted file mode 100644 index 6c10686..0000000 --- a/.config/nvim/lua/disabled/cmp.lua +++ /dev/null @@ -1,101 +0,0 @@ -local icons = { - Namespace = "󰌗", - Text = "󰉿", - Method = "󰆧", - Function = "󰆧", - Constructor = "", - Field = "󰜢", - Variable = "󰀫", - Class = "󰠱", - Interface = "", - Module = "", - Property = "󰜢", - Unit = "󰑭", - Value = "󰎠", - Enum = "", - Keyword = "󰌋", - Snippet = "", - Color = "󰏘", - File = "󰈚", - Reference = "󰈇", - Folder = "󰉋", - EnumMember = "", - Constant = "󰏿", - Struct = "󰙅", - Event = "", - Operator = "󰆕", - TypeParameter = "󰊄", - Table = "", - Object = "󰅩", - Tag = "", - Array = "[]", - Boolean = "", - Number = "", - Null = "󰟢", - String = "󰉿", - Calendar = "", - Watch = "󰥔", - Package = "", - Copilot = "", - Codeium = "", - TabNine = "", -} - -return { - "hrsh7th/nvim-cmp", - event = "InsertEnter", - dependencies = { - -- "hrsh7th/cmp-nvim-lsp", - -- "hrsh7th/cmp-buffer", - -- "hrsh7th/cmp-path", - -- "L3MON4D3/LuaSnip", - }, - opts = { - completion = { - autocomplete = true, - completeopt = "menu,menuone,noinsert", - }, - formatting = { - fields = { "abbr", "kind", "menu" }, - format = function(_, item) - local icon = icons[item.kind] or "" - item.kind = string.format(" %s %s", icon, item.kind) - return item - end, - }, - -- snippet = { - -- expand = function(args) - -- require("luasnip").lsp_expand(args.body) - -- end, - -- }, - -- preselect = cmp.PreselectMode.None, - sources = { - -- { name = "nvim_lsp" }, - -- { name = "luasnip" }, - { name = "buffer" }, - -- { name = "path" }, - }, - window = { - completion = { - border = "rounded", - scrollbar = false, - }, - documentation = { - border = "rounded", - } - }, - }, - config = function(_, opts) - local cmp = require("cmp") - - opts.mapping = { - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.select_prev_item(), - [""] = cmp.mapping.select_next_item(), - [""] = cmp.mapping.abort(), - [""] = cmp.mapping.confirm({ select = true }), - } - - cmp.setup(opts) - end, -} diff --git a/.config/nvim/lua/disabled/fidget.lua b/.config/nvim/lua/disabled/fidget.lua deleted file mode 100644 index 00a18ac..0000000 --- a/.config/nvim/lua/disabled/fidget.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - "j-hui/fidget.nvim", - opts = { - integration = { - ["nvim-tree"] = { - enable = true, - }, - }, - }, - config = true, -} diff --git a/.config/nvim/lua/disabled/indent.lua b/.config/nvim/lua/disabled/indent.lua deleted file mode 100644 index 10d362b..0000000 --- a/.config/nvim/lua/disabled/indent.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - "lukas-reineke/indent-blankline.nvim", - event = "VeryLazy", - main = "ibl", - opts = { - indent = { - char = "▏", - }, - scope = { - enabled = true, - show_start = false, - }, - }, - config = true, -} diff --git a/.config/nvim/lua/disabled/lsp-notify.lua b/.config/nvim/lua/disabled/lsp-notify.lua deleted file mode 100644 index 6f61709..0000000 --- a/.config/nvim/lua/disabled/lsp-notify.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - "mrded/nvim-lsp-notify", - config = true, -} diff --git a/.config/nvim/lua/disabled/lsp.lua b/.config/nvim/lua/disabled/lsp.lua deleted file mode 100644 index 72ec8d4..0000000 --- a/.config/nvim/lua/disabled/lsp.lua +++ /dev/null @@ -1,103 +0,0 @@ -return { - "neovim/nvim-lspconfig", - event = { "BufReadPre", "BufNewFile" }, - opts = { - servers = { - clangd = {}, - gdscript = {}, - gopls = {}, - lua_ls = { - settings = { - Lua = { - completion = { - callSnippet = "Replace", - }, - runtime = { - version = "LuaJIT", - }, - workspace = { - checkThirdParty = false, - library = { - "${3rd}/luv/library", - unpack(vim.api.nvim_get_runtime_file("", true)), - }, - }, - }, - }, - }, - rust_analyzer = { - settings = { - ["rust-analyzer"] = { - imports = { - granularity = { - group = "module", - }, - prefix = "self", - }, - cargo = { - buildScripts = { - enable = true, - }, - }, - procMacro = { - enable = true - }, - }, - }, - }, - }, - }, - config = function(_, opts) - -- Servers - local servers = opts.servers - - for server, server_opts in pairs(servers) do - require("lspconfig")[server].setup(server_opts) - end - - -- Icons - local icons = { - Error = " ", - Warn = " ", - Hint = " ", - Info = " ", - } - - for name, icon in pairs(icons) do - name = "DiagnosticSign" .. name - vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" }) - end - - -- Runs when the LSP is attached - vim.api.nvim_create_autocmd("LspAttach", { - group = vim.api.nvim_create_augroup("lsp-attach", { clear = true }), - callback = function(event) - local function map(mode, lhs, rhs, info) - vim.keymap.set(mode, lhs, rhs, { buffer = event.buf, desc = "LSP: " .. info }) - end - - map("n", "gr", require("telescope.builtin").lsp_references, "References") - map("n", "gd", require("telescope.builtin").lsp_definitions, "Definition") - map({ "n", "i" }, "", vim.lsp.buf.hover, "Hover") - map({ "n", "i" }, "", vim.lsp.buf.rename, "Rename") - map({ "n", "i" }, "", vim.lsp.buf.format, "Format") - map("n", "ca", vim.lsp.buf.code_action, "Code action") - - -- Highlight the word your cursor is on - -- 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, - }) - end, -} diff --git a/.config/nvim/lua/disabled/luasnip.lua b/.config/nvim/lua/disabled/luasnip.lua deleted file mode 100644 index a4865c1..0000000 --- a/.config/nvim/lua/disabled/luasnip.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - "L3MON4D3/LuaSnip", - dependencies = { - "rafamadriz/friendly-snippets" - }, - event = "InsertEnter", - version = "v2.*", - config = function() - require("luasnip.loaders.from_vscode").lazy_load() - end, -} diff --git a/.config/nvim/lua/disabled/mini-complete.lua b/.config/nvim/lua/disabled/mini-complete.lua deleted file mode 100644 index 698d0e6..0000000 --- a/.config/nvim/lua/disabled/mini-complete.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - "echasnovski/mini.completion", - event = "InsertEnter", - opts = { - set_vim_settings = false, - }, - config = true, -} diff --git a/.config/nvim/lua/disabled/mini-surround.lua b/.config/nvim/lua/disabled/mini-surround.lua deleted file mode 100644 index e687abe..0000000 --- a/.config/nvim/lua/disabled/mini-surround.lua +++ /dev/null @@ -1,18 +0,0 @@ -return { - "echasnovski/mini.surround", - event = { "BufReadPost", "BufNewFile" }, - opts = { - mappings = { - add = 'gsa', - delete = 'gsd', - find = 'gsf', - find_left = 'gsF', - highlight = 'gsh', - replace = 'gsr', - update_n_lines = 'gsn', - suffix_last = '', - suffix_next = '', - }, - }, - config = true, -} diff --git a/.config/nvim/lua/disabled/multicursor.lua b/.config/nvim/lua/disabled/multicursor.lua deleted file mode 100644 index e168951..0000000 --- a/.config/nvim/lua/disabled/multicursor.lua +++ /dev/null @@ -1,14 +0,0 @@ -return { - "mg979/vim-visual-multi", - keys = { - { "", mode = { "n", "x" }, desc = "Multicursor (word)" }, - { "", mode = { "n", "x" }, desc = "Multicursor (next line)" }, - { "", mode = { "n", "x" }, desc = "Multicursor (previous line)" }, - }, - init = function() - vim.g.VM_maps = { - ["Find Under"] = "", - ["Find Subword Under"] = "", - } - end, -} diff --git a/.config/nvim/lua/disabled/noice.lua b/.config/nvim/lua/disabled/noice.lua deleted file mode 100644 index b8ce7f6..0000000 --- a/.config/nvim/lua/disabled/noice.lua +++ /dev/null @@ -1,17 +0,0 @@ -return { - "folke/noice.nvim", - event = "VeryLazy", - dependencies = { - "MunifTanjim/nui.nvim", - }, - opts = { - lsp = { - override = { - ["vim.lsp.util.convert_input_to_markdown_lines"] = true, - ["vim.lsp.util.stylize_markdown"] = true, - ["cmp.entry.get_documentation"] = true, - }, - }, - }, - config = true, -} diff --git a/.config/nvim/lua/disabled/notify.lua b/.config/nvim/lua/disabled/notify.lua deleted file mode 100644 index 27ffe6a..0000000 --- a/.config/nvim/lua/disabled/notify.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - "rcarriga/nvim-notify", - event = "VeryLazy", - opts = { - background_colour = "#000000", - fps = 60, - render = "compact", - timeout = 0, - }, - config = true, -} diff --git a/.config/nvim/lua/disabled/nvterm.lua b/.config/nvim/lua/disabled/nvterm.lua deleted file mode 100644 index ae6851d..0000000 --- a/.config/nvim/lua/disabled/nvterm.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "NvChad/nvterm", - keys = { - { "", "lua require('nvterm.terminal').toggle('float')", mode = { "n", "t" }, desc = "Toggle terminal" }, - }, - config = true, -} diff --git a/.config/nvim/lua/disabled/onedark.lua b/.config/nvim/lua/disabled/onedark.lua deleted file mode 100644 index 33b1b5a..0000000 --- a/.config/nvim/lua/disabled/onedark.lua +++ /dev/null @@ -1,19 +0,0 @@ -return { - "navarasu/onedark.nvim", - lazy = false, - priority = 1000, - opts = { - style = "dark", - transparent = true, - term_colors = true, - highlights = { - ["StatusLine"] = {fg = "$bg3", bg = "Normal"}, - ["StatusLineNC"] = {fg = "$bg3", bg = "Normal"}, - }, - }, - config = function(_, opts) - local theme = require("onedark") - theme.setup(opts) - theme.load() - end, -} diff --git a/.config/nvim/lua/disabled/snacks.lua b/.config/nvim/lua/disabled/snacks.lua deleted file mode 100644 index 817be35..0000000 --- a/.config/nvim/lua/disabled/snacks.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - "folke/snacks.nvim", - event = "BufReadPre", - opts = { - explorer = { - replace_netrw = true, - }, - }, - config = true, -} \ No newline at end of file diff --git a/.config/nvim/lua/disabled/spectre.lua b/.config/nvim/lua/disabled/spectre.lua deleted file mode 100644 index ebbe15e..0000000 --- a/.config/nvim/lua/disabled/spectre.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "nvim-pack/nvim-spectre", - keys = { - { "sr", function() require("spectre").open() end, desc = "Replace in files (Spectre)" }, - }, - config = true, -} diff --git a/.config/nvim/lua/disabled/tree.lua b/.config/nvim/lua/disabled/tree.lua deleted file mode 100644 index b97f63d..0000000 --- a/.config/nvim/lua/disabled/tree.lua +++ /dev/null @@ -1,73 +0,0 @@ -local function on_attach(bufnr) - local api = require("nvim-tree.api") - - -- default mappings - api.config.mappings.default_on_attach(bufnr) - - local function opts(desc) - return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true } - end - - -- navigation - vim.keymap.set("n", "", api.tree.change_root_to_parent, opts("Up")) - vim.keymap.set("n", "", api.tree.change_root_to_parent, opts("Up")) - vim.keymap.set("n", "", api.tree.change_root_to_node, opts("Enter")) - vim.keymap.set("n", "", api.tree.change_root_to_node, opts("Enter")) - - -- open folders with a single click - vim.keymap.set("n", "", function() - vim.defer_fn(function () - local win = vim.api.nvim_get_current_win() - local view = require("nvim-tree.view") - if view.get_winnr() ~= win then return end - - api.node.open.edit() - api.tree.focus() - end, 10) - end, opts("Open folder/file")) -end - -return { - "nvim-tree/nvim-tree.lua", - event = "VeryLazy", - dependencies = { - "nvim-tree/nvim-web-devicons", - }, - keys = { - { "e", function() require("nvim-tree.api").tree.toggle() end, desc = "Toggle files" }, - }, - opts = { - filesystem_watchers = { - enable = true, - }, - filters = { - dotfiles = false, - }, - on_attach = on_attach, - renderer = { - root_folder_label = false, - highlight_git = true, - icons = { - show = { - git = false, - }, - glyphs = { - git = { - unstaged = "", - untracked = "", - deleted = "", - }, - }, - }, - }, - sync_root_with_cwd = true, - update_focused_file = { - enable = true, - update_root = false, - }, - view = { - width = 30, - }, - }, - config = true, -} diff --git a/.config/nvim/lua/disabled/trouble.lua b/.config/nvim/lua/disabled/trouble.lua deleted file mode 100644 index 2a79606..0000000 --- a/.config/nvim/lua/disabled/trouble.lua +++ /dev/null @@ -1,16 +0,0 @@ -return { - "folke/trouble.nvim", - event = "VeryLazy", - keys = { - { "x", function() require("trouble").toggle() end, desc = "Show errors" }, - }, - dependencies = { - "nvim-tree/nvim-web-devicons", - }, - opts = { - position = "right", - padding = false, - use_diagnostic_signs = true, - }, - config = true, -} diff --git a/.config/nvim/lua/keys.lua b/.config/nvim/lua/keys.lua index e8088fe..d21e641 100644 --- a/.config/nvim/lua/keys.lua +++ b/.config/nvim/lua/keys.lua @@ -1,3 +1,5 @@ +vim.g.mapleader = " " + local function map(mode, lhs, rhs, info) vim.keymap.set(mode, lhs, rhs, { desc = info }) end @@ -6,7 +8,6 @@ map("n", ";", ":", "Command mode") map("n", "U", "redo", "Redo") map("n", "", "ToggleWord", "Toggle word") map("n", "", "close", "Close window") -map("n", "l", "Lazy", "Lazy") map({"n", "v"}, "q", "qa", "Quit all") map({"n", "v"}, "q", "qa!", "Quit all") map({"n", "i"}, "", "noh", "Clear search") @@ -65,4 +66,4 @@ map("i", "", "v") map("n", "", "k", "Move to the window above") map("n", "", "j", "Move to the window below") map("n", "", "h", "Move to the window on the left") -map("n", "", "l", "Move to the window on the right") +map("n", "", "l", "Move to the window on the right") \ No newline at end of file diff --git a/.config/nvim/lua/packages.lua b/.config/nvim/lua/packages.lua deleted file mode 100644 index 82a9611..0000000 --- a/.config/nvim/lua/packages.lua +++ /dev/null @@ -1,69 +0,0 @@ --- Install the package manager if needed -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", - lazypath, - }) -end - -vim.opt.rtp:prepend(lazypath) - --- Load plugins -require("lazy").setup("plugins", { - defaults = { - lazy = true, - }, - change_detection = { - notify = false - }, - rocks = { - enabled = false - }, - ui = { - icons = { - ft = "", - lazy = "󰂠 ", - loaded = "", - not_loaded = "", - }, - }, - performance = { - rtp = { - disabled_plugins = { - "2html_plugin", - "tohtml", - "getscript", - "getscriptPlugin", - "gzip", - "logipat", - "netrw", - "netrwPlugin", - "netrwSettings", - "netrwFileHandlers", - "matchit", - "tar", - "tarPlugin", - "rrhelper", - "spellfile_plugin", - "vimball", - "vimballPlugin", - "zip", - "zipPlugin", - "tutor", - "rplugin", - "syntax", - "synmenu", - "optwin", - "compiler", - "bugreport", - "ftplugin", - }, - }, - }, -}) \ No newline at end of file diff --git a/.config/nvim/lua/plugins/autopairs.lua b/.config/nvim/lua/plugins/autopairs.lua deleted file mode 100644 index 6378d47..0000000 --- a/.config/nvim/lua/plugins/autopairs.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - "windwp/nvim-autopairs", - event = "InsertEnter", - config = true, -} diff --git a/.config/nvim/lua/plugins/comment.lua b/.config/nvim/lua/plugins/comment.lua deleted file mode 100644 index b21a3d2..0000000 --- a/.config/nvim/lua/plugins/comment.lua +++ /dev/null @@ -1,23 +0,0 @@ -return { - "numToStr/Comment.nvim", - keys = { - { - "", - "lua require('Comment.api').toggle.linewise.current()", - desc = "Toggle comment", - }, - { - "", - "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", - mode = "v", - desc = "Toggle comment", - }, - }, - config = true, - opts = { - mappings = { - basic = false, - extra = false, - }, - }, -} diff --git a/.config/nvim/lua/plugins/flash.lua b/.config/nvim/lua/plugins/flash.lua deleted file mode 100644 index 2f69412..0000000 --- a/.config/nvim/lua/plugins/flash.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - "folke/flash.nvim", - event = { "BufReadPost", "BufNewFile" }, - keys = { - { "s", function() require("flash").jump() end, mode = { "n", "o", "x" }, desc = "Flash" }, - { "S", function() require("flash").treesitter() end, mode = { "n", "o", "x" }, desc = "Flash Treesitter" }, - }, - config = true, -} diff --git a/.config/nvim/lua/plugins/gitsigns.lua b/.config/nvim/lua/plugins/gitsigns.lua deleted file mode 100644 index 419cbd8..0000000 --- a/.config/nvim/lua/plugins/gitsigns.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - "lewis6991/gitsigns.nvim", - event = "BufReadPre", - config = true, -} \ No newline at end of file diff --git a/.config/nvim/lua/plugins/monokai.lua b/.config/nvim/lua/plugins/monokai.lua deleted file mode 100644 index 8dd7b26..0000000 --- a/.config/nvim/lua/plugins/monokai.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "tanvirtin/monokai.nvim", - lazy = false, - priority = 1000, - opts = {}, - config = true, -} diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua deleted file mode 100644 index 8f18a87..0000000 --- a/.config/nvim/lua/plugins/telescope.lua +++ /dev/null @@ -1,36 +0,0 @@ -return { - "nvim-telescope/telescope.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-telescope/telescope-project.nvim", - }, - keys = { - {"", "Telescope buffers", desc = "Buffers"}, - {"f", "Telescope find_files", desc = "Find files"}, - {"p", "Telescope project", desc = "Projects"}, - {"r", "Telescope oldfiles", desc = "Recent files"}, - }, - config = function() - require("telescope").setup({ - defaults = { - mappings = { - i = { - [""] = require("telescope.actions").close, - }, - }, - prompt_prefix = " ", - selection_caret = " ", - }, - extensions = { - project = { - base_dirs = { - { path = "~/projects", max_depth = 3 }, - }, - order_by = "desc", - sync_with_nvim_tree = true, - theme = "dropdown", - }, - }, - }) - end, -} diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua deleted file mode 100644 index 78459c1..0000000 --- a/.config/nvim/lua/plugins/treesitter.lua +++ /dev/null @@ -1,18 +0,0 @@ -return { - "nvim-treesitter/nvim-treesitter", - event = { "BufReadPost", "BufNewFile" }, - build = ":TSUpdate", - opts = { - ensure_installed = { - "go", - "gomod", - "gowork", - "gosum", - }, - highlight = { enable = true }, - indent = { enable = true }, - }, - config = function(_, opts) - require("nvim-treesitter.configs").setup(opts) - end, -} diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua index b113589..7c73e8f 100644 --- a/.config/nvim/lua/settings.lua +++ b/.config/nvim/lua/settings.lua @@ -1,11 +1,3 @@ --- Globals -local g = vim.g -g.mapleader = " " - -for _, provider in ipairs { "node", "perl", "python3", "ruby" } do - g["loaded_" .. provider .. "_provider"] = 0 -end - -- Options local opt = vim.opt opt.autowrite = false