From 2530e4298a2d0ddbeefa15af0881c27786d6084a Mon Sep 17 00:00:00 2001 From: Trianta <56975502+Trimutex@users.noreply.github.com> Date: Tue, 4 Feb 2025 07:24:53 -0600 Subject: [PATCH] version: update to v0.1.0 --- .zshrc | 3 + nvim/after/plugin/settings.lua | 1 - nvim/lua/trianta/colors.lua | 11 -- nvim/lua/trianta/focus.lua | 45 ------- nvim/lua/trianta/init.lua | 3 +- nvim/lua/trianta/lazy.lua | 165 +++++++++++++++++++++++++- nvim/lua/trianta/lsp.lua | 22 ---- nvim/lua/trianta/nav.lua | 12 -- nvim/lua/trianta/obsidian.lua | 23 ---- nvim/lua/trianta/ollama.lua | 49 -------- nvim/lua/trianta/remap.lua | 2 - nvim/lua/trianta/{set.lua => vim.lua} | 4 + 12 files changed, 167 insertions(+), 173 deletions(-) delete mode 100644 nvim/lua/trianta/colors.lua delete mode 100644 nvim/lua/trianta/focus.lua delete mode 100644 nvim/lua/trianta/lsp.lua delete mode 100644 nvim/lua/trianta/nav.lua delete mode 100644 nvim/lua/trianta/obsidian.lua delete mode 100644 nvim/lua/trianta/ollama.lua delete mode 100644 nvim/lua/trianta/remap.lua rename nvim/lua/trianta/{set.lua => vim.lua} (81%) diff --git a/.zshrc b/.zshrc index 0ce9281..b995a73 100644 --- a/.zshrc +++ b/.zshrc @@ -32,6 +32,7 @@ alias -g cmakeb="cmake --build build -j $(nproc)" alias -g pcore="taskset -c 1-7" alias -g a="notify" alias -g af="taskset -c 0-19 notify" +alias -g tm="tmux new -A -s" # Plugins from AUR source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme @@ -101,4 +102,6 @@ export EDITOR="nvim" # Global CMake clangd fix export CMAKE_EXPORT_COMPILE_COMMANDS=1 +[[ "$(tty)" == /dev/tty1 ]] && Hyprland + $(&>/dev/null pw-play --volume=2.0 ~/.alert/ready.mp3 &) diff --git a/nvim/after/plugin/settings.lua b/nvim/after/plugin/settings.lua index ee4a1ea..1b99340 100644 --- a/nvim/after/plugin/settings.lua +++ b/nvim/after/plugin/settings.lua @@ -15,7 +15,6 @@ end) -- Mason require('mason').setup({}) require('mason-lspconfig').setup({ - ensure_installed = {'tsserver', 'rust_analyzer'}, handlers = { lsp_zero.default_setup, lua_ls = function() diff --git a/nvim/lua/trianta/colors.lua b/nvim/lua/trianta/colors.lua deleted file mode 100644 index c2cb8d1..0000000 --- a/nvim/lua/trianta/colors.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - { - "catppuccin/nvim", - name = "catppuccin", - priority = 1000 - }, - { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - } -} diff --git a/nvim/lua/trianta/focus.lua b/nvim/lua/trianta/focus.lua deleted file mode 100644 index 117d193..0000000 --- a/nvim/lua/trianta/focus.lua +++ /dev/null @@ -1,45 +0,0 @@ -return { - { - "folke/twilight.nvim", - opts = { - dimming = { - alpha = 0.25, - color = { "Normal", "#ffffff" }, - term_bg = "#000000", - inactive = false, - }, - context = 10, - treesitter = true, - expand = { - "function", - "method", - "table", - "if_statement" - }, - }, - }, - { - "folke/zen-mode.nvim", - opts = { - { - window = { - backdrop = 0.95, - width = 120, - height = 1, - }, - plugins = { - options = { - enabled = true, - ruler = false, - showcmd = false, - }, - twilight = { enabled = true }, - }, - on_open = function(win) - end, - on_close = function() - end, - } - } - } -} diff --git a/nvim/lua/trianta/init.lua b/nvim/lua/trianta/init.lua index 184d657..21b0df6 100644 --- a/nvim/lua/trianta/init.lua +++ b/nvim/lua/trianta/init.lua @@ -1,4 +1,3 @@ -require("trianta.set") -require("trianta.remap") +require("trianta.vim") require("trianta.lazy") diff --git a/nvim/lua/trianta/lazy.lua b/nvim/lua/trianta/lazy.lua index 2e5e229..321824a 100644 --- a/nvim/lua/trianta/lazy.lua +++ b/nvim/lua/trianta/lazy.lua @@ -27,10 +27,163 @@ return require('lazy').setup({ -- refer to the configuration section below } }, - require("trianta.colors"), - require("trianta.lsp"), - require("trianta.nav"), - require("trianta.focus"), - require("trianta.obsidian"), - require("trianta.ollama"), + { + "catppuccin/nvim", + name = "catppuccin", + priority = 1000 + }, + -- colors + { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + }, + { + 'VonHeikemen/lsp-zero.nvim', + branch = 'v3.x', + dependencies = { + -- LSP Support + "neovim/nvim-lspconfig", -- Required + 'williamboman/mason.nvim', -- Optional + 'williamboman/mason-lspconfig.nvim', -- Optional + + -- Autocompletion + 'hrsh7th/nvim-cmp', -- Required + 'hrsh7th/cmp-nvim-lsp', -- Required + 'hrsh7th/cmp-buffer', -- Optional + 'hrsh7th/cmp-path', -- Optional + 'saadparwaiz1/cmp_luasnip', -- Optional + 'hrsh7th/cmp-nvim-lua', -- Optional + + -- Snippets + 'L3MON4D3/LuaSnip', -- Required + 'rafamadriz/friendly-snippets', -- Optional + } + }, + -- navigation + { + "nvim-telescope/telescope.nvim", + tag = '0.1.8', + dependencies = { "nvim-lua/plenary.nvim" }, + }, + { + "ThePrimeagen/harpoon", + branch = "harpoon2", + dependencies = { "nvim-lua/plenary.nvim" }, + }, + -- focus plugins + { + "folke/twilight.nvim", + opts = { + dimming = { + alpha = 0.25, + color = { "Normal", "#ffffff" }, + term_bg = "#000000", + inactive = false, + }, + context = 10, + treesitter = true, + expand = { + "function", + "method", + "table", + "if_statement" + }, + }, + }, + { + "folke/zen-mode.nvim", + opts = { + { + window = { + backdrop = 0.95, + width = 120, + height = 1, + }, + plugins = { + options = { + enabled = true, + ruler = false, + showcmd = false, + }, + twilight = { enabled = true }, + }, + on_open = function(win) + end, + on_close = function() + end, + } + } + }, + -- obsidian + { + "epwalsh/obsidian.nvim", + version = "v3.2.0", + lazy = true, + ft = "markdown", + dependencies = { + "nvim-lua/plenary.nvim", + }, + opts = { + workspaces = { + { + name = "trinote", + path = "~/sync/obsidian/Trinote/", + }, + }, + disable_frontmatter = true, + }, + ui = { + enable = true + } + }, + -- ollama + { + "nomnivore/ollama.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + }, + + -- All the user commands added by the plugin + cmd = { "Ollama", "OllamaModel", "OllamaServe", "OllamaServeStop" }, + + keys = { + -- Sample keybind for prompt menu. Note that the is important for selections to work properly. + { + "oo", + ":lua require('ollama').prompt()", + desc = "ollama prompt", + mode = { "n", "v" }, + }, + + -- Sample keybind for direct prompting. Note that the is important for selections to work properly. + { + "oG", + ":lua require('ollama').prompt('Generate_Code')", + desc = "ollama Generate Code", + mode = { "n", "v" }, + }, + }, + + ---@type Ollama.Config + opts = { + model = "codellama", + url = "factory.lan:11434", + serve = { + on_start = false, + command = "ollama", + args = { "serve" }, + stop_command = "pkill", + stop_args = { "-SIGTERM", "ollama" }, + }, + -- View the actual default prompts in ./lua/ollama/prompts.lua + prompts = { + Sample_Prompt = { + prompt = "This is a sample prompt that receives $input and $sel(ection), among others.", + input_label = "> ", + model = "mistral", + action = "display", + } + } + } + } }) diff --git a/nvim/lua/trianta/lsp.lua b/nvim/lua/trianta/lsp.lua deleted file mode 100644 index 25c5692..0000000 --- a/nvim/lua/trianta/lsp.lua +++ /dev/null @@ -1,22 +0,0 @@ -return { - 'VonHeikemen/lsp-zero.nvim', - branch = 'v3.x', - dependencies = { - -- LSP Support - "neovim/nvim-lspconfig", -- Required - 'williamboman/mason.nvim', -- Optional - 'williamboman/mason-lspconfig.nvim', -- Optional - - -- Autocompletion - 'hrsh7th/nvim-cmp', -- Required - 'hrsh7th/cmp-nvim-lsp', -- Required - 'hrsh7th/cmp-buffer', -- Optional - 'hrsh7th/cmp-path', -- Optional - 'saadparwaiz1/cmp_luasnip', -- Optional - 'hrsh7th/cmp-nvim-lua', -- Optional - - -- Snippets - 'L3MON4D3/LuaSnip', -- Required - 'rafamadriz/friendly-snippets', -- Optional - } -} diff --git a/nvim/lua/trianta/nav.lua b/nvim/lua/trianta/nav.lua deleted file mode 100644 index f0aa119..0000000 --- a/nvim/lua/trianta/nav.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - { - "nvim-telescope/telescope.nvim", - tag = '0.1.8', - dependencies = { "nvim-lua/plenary.nvim" }, - }, - { - "ThePrimeagen/harpoon", - branch = "harpoon2", - dependencies = { "nvim-lua/plenary.nvim" }, - } -} diff --git a/nvim/lua/trianta/obsidian.lua b/nvim/lua/trianta/obsidian.lua deleted file mode 100644 index b9a1884..0000000 --- a/nvim/lua/trianta/obsidian.lua +++ /dev/null @@ -1,23 +0,0 @@ -return { - { - "epwalsh/obsidian.nvim", - version = "v3.2.0", - lazy = true, - ft = "markdown", - dependencies = { - "nvim-lua/plenary.nvim", - }, - opts = { - workspaces = { - { - name = "trinote", - path = "~/sync/obsidian/Trinote/", - }, - }, - disable_frontmatter = true, - }, - ui = { - enable = true - } - } -} diff --git a/nvim/lua/trianta/ollama.lua b/nvim/lua/trianta/ollama.lua deleted file mode 100644 index 00451f6..0000000 --- a/nvim/lua/trianta/ollama.lua +++ /dev/null @@ -1,49 +0,0 @@ -return { - "nomnivore/ollama.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - }, - - -- All the user commands added by the plugin - cmd = { "Ollama", "OllamaModel", "OllamaServe", "OllamaServeStop" }, - - keys = { - -- Sample keybind for prompt menu. Note that the is important for selections to work properly. - { - "oo", - ":lua require('ollama').prompt()", - desc = "ollama prompt", - mode = { "n", "v" }, - }, - - -- Sample keybind for direct prompting. Note that the is important for selections to work properly. - { - "oG", - ":lua require('ollama').prompt('Generate_Code')", - desc = "ollama Generate Code", - mode = { "n", "v" }, - }, - }, - - ---@type Ollama.Config - opts = { - model = "codellama", - url = "factory.lan:11434", - serve = { - on_start = false, - command = "ollama", - args = { "serve" }, - stop_command = "pkill", - stop_args = { "-SIGTERM", "ollama" }, - }, - -- View the actual default prompts in ./lua/ollama/prompts.lua - prompts = { - Sample_Prompt = { - prompt = "This is a sample prompt that receives $input and $sel(ection), among others.", - input_label = "> ", - model = "mistral", - action = "display", - } - } - } -} diff --git a/nvim/lua/trianta/remap.lua b/nvim/lua/trianta/remap.lua deleted file mode 100644 index b760350..0000000 --- a/nvim/lua/trianta/remap.lua +++ /dev/null @@ -1,2 +0,0 @@ -vim.g.mapleader = " " -vim.keymap.set("n", "pv", vim.cmd.Ex) diff --git a/nvim/lua/trianta/set.lua b/nvim/lua/trianta/vim.lua similarity index 81% rename from nvim/lua/trianta/set.lua rename to nvim/lua/trianta/vim.lua index d6f4184..61e5b22 100644 --- a/nvim/lua/trianta/set.lua +++ b/nvim/lua/trianta/vim.lua @@ -1,3 +1,4 @@ +-- vim core settings vim.opt.nu = true vim.opt.tabstop = 4 @@ -24,3 +25,6 @@ vim.opt.colorcolumn = "80" vim.g.mapleader = " " vim.opt.mouse = "" + +vim.g.mapleader = " " +vim.keymap.set("n", "pv", vim.cmd.Ex)