Commit 4812123

Ansari <ping@ansari.wtf>
2025-07-25 18:22:55
Getting started with fucking nvim -its lazy man
1 parent 42369a4
.config/ghostty/config
@@ -10,7 +10,7 @@ font-family = Hack Nerd Font Propo
 
 background-opacity = 0.95
 
-cursor-color = lightgreen
+cursor-color = #b4befe
 
 cursor-style = bar
 cursor-style-blink = true
.config/nvim/lua/plugins/catppuccin.lua
@@ -0,0 +1,9 @@
+return {
+	"catppuccin/nvim", 
+	lazy = false,
+	name = "catppuccin", 
+	priority = 1000,
+	config = function()
+		vim.cmd.colorscheme "catppuccin"
+	end
+}
.config/nvim/lua/plugins/lualine.lua
@@ -0,0 +1,19 @@
+return {
+    'nvim-lualine/lualine.nvim',
+	config = function()
+		require('lualine').setup({
+			options = {
+				theme = 'dracula',
+			},
+			sections = {
+				lualine_a = {'mode'},
+				lualine_b = {'branch', 'diff', 'diagnostics'},
+				lualine_c = {'filename'},
+				lualine_x = {'encoding', 'fileformat', 'filetype'},
+				lualine_y = {''},
+				lualine_z = {'tabs'}
+			}
+		})
+	end
+}
+
.config/nvim/lua/plugins/neo-tree.lua
@@ -0,0 +1,54 @@
+return {
+	"nvim-neo-tree/neo-tree.nvim",
+	branch = "v3.x",
+	dependencies = {
+		"nvim-lua/plenary.nvim",
+		"MunifTanjim/nui.nvim",
+		"nvim-tree/nvim-web-devicons", 
+    },
+    lazy = false,
+	config= function()
+		require("neo-tree").setup({
+			close_if_last_window = true,
+			popup_border_style = "NC",
+			enable_git_status = true,
+			enable_diagnostics = true,
+
+			window = {
+    			position = "right",
+				width = 30,
+				mappings = {
+	      			["l"] = "focus_preview"
+				}
+			},
+
+			default_component_configs = {
+				git_status = {
+				symbols = {
+					added = "✚",
+					modified = "",
+					deleted = "✖", 
+					renamed = "󰁕", 
+					untracked = "󰎔",
+					ignored = "",
+					unstaged = "󰄱",
+					staged = "",
+					conflict = "",
+					},
+				},
+			},
+			filesystem = {
+				follow_current_file = {
+					enabled = true,
+					},
+					filtered_items = {
+						hide_dotfiles = false,
+						hide_gitignored = true,
+					}
+			}
+		})
+	end
+
+}
+
+
.config/nvim/lua/plugins/nvim-treesitter.lua
@@ -0,0 +1,16 @@
+return {
+	"nvim-treesitter/nvim-treesitter",
+	build = ":TSUpdate",
+	config = function()
+		local configs = require("nvim-treesitter.configs")
+		configs.setup({
+			ensure_installed = { "c","cpp","go",
+				"rust","css", "lua", "vim",
+				"vimdoc", "javascript", "html",
+				"typescript","json","make","cmake",
+				"python","yaml","bash"},
+			highlight = { enable = true },
+			indent = { enable = true }
+		})
+	end
+}
.config/nvim/lua/plugins/telescope.lua
@@ -0,0 +1,21 @@
+return {
+	'nvim-telescope/telescope.nvim', tag = '0.1.8',
+	dependencies = { 'nvim-lua/plenary.nvim' },
+	config = function()
+		local actions = require("telescope.actions")
+		require('telescope').setup({
+		pickers = {
+				find_files = {
+					find_command = { "rg", "--files", 
+						"--hidden", "--follow",
+						"--glob", "!.git/*",
+						"--glob", "!node_modules/*"
+					}
+					}
+  			}
+		})
+		local builtin = require('telescope.builtin')
+		vim.keymap.set('n', '<C-p>', builtin.find_files, { desc = 'Telescope find files' })
+		vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
+	end
+}
.config/nvim/lua/plugins/window-picker.lua
@@ -0,0 +1,9 @@
+return {
+    's1n7ax/nvim-window-picker',
+    name = 'window-picker',
+    event = 'VeryLazy',
+    version = '2.*',
+    config = function()
+        require'window-picker'.setup()
+    end,
+}
.config/nvim/lua/keymaps.lua
@@ -0,0 +1,9 @@
+-- Move lines up/down in normal mode
+vim.keymap.set("n", "<A-j>", ":m .+1<CR>==",{})
+vim.keymap.set("n", "<A-k>", ":m .-2<CR>==",{})
+vim.keymap.set("v", "<A-j>", ":m '>+1<CR>gv=gv",{})
+vim.keymap.set("v", "<A-k>", ":m '<-2<CR>gv=gv",{})
+
+vim.keymap.set('n', '<Tab>', ':tabnext<CR>', { noremap = true, silent = true })
+vim.keymap.set('n', '<C-S-b>', ':Neotree toggle<CR>', {noremap = true, silent = true})
+vim.keymap.set('n', '<S-Tab>', ':tabprevious<CR>', { noremap = true, silent = true })
.config/nvim/lua/options.lua
@@ -0,0 +1,41 @@
+vim.g.mapleader = " "
+
+local opt = vim.opt
+
+opt.shortmess:append("I")
+opt.shiftwidth = 2
+opt.tabstop = 2
+opt.shiftround = true
+opt.smartindent = true
+opt.autowrite = true
+opt.conceallevel = 2
+opt.confirm = true
+opt.cursorline = true
+opt.ignorecase = true
+opt.smartcase = true
+opt.linebreak = true
+opt.number = true
+opt.relativenumber = true
+opt.scrolloff = 4
+opt.sidescrolloff = 8
+opt.undofile = true
+opt.undolevels = 10000
+opt.updatetime = 200
+opt.timeoutlen = vim.g.vscode and 1000 or 300
+
+opt.foldlevel = 99
+opt.signcolumn = "yes"
+opt.formatexpr = "v:lua.require'lazyvim.util'.format.formatexpr()"
+opt.formatoptions = "jcroqlnt"
+opt.grepformat = "%f:%l:%c:%m"
+opt.grepprg = "rg --vimgrep"
+opt.inccommand = "nosplit"
+opt.laststatus = 3
+opt.mouse = "a"
+opt.termguicolors = true
+opt.pumblend = 10
+opt.pumheight = 10
+opt.wrap = false
+
+opt.ruler = false
+opt.showmode = false
.config/nvim/init.lua
@@ -0,0 +1,21 @@
+local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
+if not (vim.uv or vim.loop).fs_stat(lazypath) then
+  vim.notify("lazy.nvim not found. Cloning...", vim.log.levels.INFO)
+
+  local result = vim.fn.system({
+    "git", "clone", "--filter=blob:none", "--branch=stable",
+    "https://github.com/folke/lazy.nvim.git", lazypath
+  })
+
+  if vim.v.shell_error ~= 0 then
+    vim.notify("Failed to clone lazy.nvim:\n" .. result, vim.log.levels.ERROR)
+    return
+  end
+end
+
+vim.opt.rtp:prepend(lazypath)
+
+require("keymaps")
+require("options")
+require("lazy").setup("plugins")
+
.zshrc
@@ -53,6 +53,7 @@ alias cdd="cd $DEV"
 alias src="source $HOME/.zshrc"
 alias la="ls -a"
 alias ccat="bat --color=always"
+alias vim=nvim
 #--------------------------------------------------------------------------------
 # FUNCTIONS
 #--------------------------------------------------------------------------------