From 40b93375947bd89b8894967738c0a448d31f131d Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Thu, 16 Jan 2025 00:19:31 -0600 Subject: [PATCH] chore: initial commit --- init.lua | 24 ++++++++++++++++++++++++ lazy-lock.json | 11 +++++++++++ lua/plugins.lua | 2 ++ lua/plugins/github-theme.lua | 7 +++++++ lua/plugins/lualine.lua | 7 +++++++ lua/plugins/neotree.lua | 13 +++++++++++++ lua/plugins/telescope.lua | 13 +++++++++++++ lua/plugins/treesitter.lua | 13 +++++++++++++ lua/vim-options.lua | 8 ++++++++ 9 files changed, 98 insertions(+) create mode 100644 init.lua create mode 100644 lazy-lock.json create mode 100644 lua/plugins.lua create mode 100644 lua/plugins/github-theme.lua create mode 100644 lua/plugins/lualine.lua create mode 100644 lua/plugins/neotree.lua create mode 100644 lua/plugins/telescope.lua create mode 100644 lua/plugins/treesitter.lua create mode 100644 lua/vim-options.lua diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..aaed9b1 --- /dev/null +++ b/init.lua @@ -0,0 +1,24 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + +if not (vim.uv or vim.loop).fs_stat(lazypath) then + + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end + +end + +vim.opt.rtp:prepend(lazypath) + +require("vim-options") +require("lazy").setup("plugins") + diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 0000000..7dabbb0 --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,11 @@ +{ + "github-theme": { "branch": "main", "commit": "c106c9472154d6b2c74b74565616b877ae8ed31d" }, + "lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, + "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "e6645ecfcba3e064446a6def1c10d788c9873f51" }, + "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, + "nvim-treesitter": { "branch": "master", "commit": "f0c928dbe93533b7e35894a8f957f40150d1f663" }, + "nvim-web-devicons": { "branch": "master", "commit": "aafa5c187a15701a7299a392b907ec15d9a7075f" }, + "plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" }, + "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" } +} diff --git a/lua/plugins.lua b/lua/plugins.lua new file mode 100644 index 0000000..4bb3f15 --- /dev/null +++ b/lua/plugins.lua @@ -0,0 +1,2 @@ +return { } + diff --git a/lua/plugins/github-theme.lua b/lua/plugins/github-theme.lua new file mode 100644 index 0000000..0887dfa --- /dev/null +++ b/lua/plugins/github-theme.lua @@ -0,0 +1,7 @@ +return { + 'projekt0n/github-nvim-theme', + name = 'github-theme', + config = function() + vim.cmd('colorscheme github_dark_dimmed') + end +} diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua new file mode 100644 index 0000000..5549a0d --- /dev/null +++ b/lua/plugins/lualine.lua @@ -0,0 +1,7 @@ +return { + "nvim-lualine/lualine.nvim", + config = function() + require("lualine").setup() + options = { theme = "dracula" } + end +} diff --git a/lua/plugins/neotree.lua b/lua/plugins/neotree.lua new file mode 100644 index 0000000..19d9eda --- /dev/null +++ b/lua/plugins/neotree.lua @@ -0,0 +1,13 @@ +return { + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + "MunifTanjim/nui.nvim", + }, + config = function() + vim.keymap.set('n', '', ':Neotree filesystem reveal right', { desc = 'Neotree show explorer' }) + end +} + diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua new file mode 100644 index 0000000..5563aea --- /dev/null +++ b/lua/plugins/telescope.lua @@ -0,0 +1,13 @@ +return { + 'nvim-telescope/telescope.nvim', + tag = '0.1.8', + dependencies = { 'nvim-lua/plenary.nvim' }, + config = function() + local builtin = require('telescope.builtin') + + vim.keymap.set('n', '', builtin.find_files, { desc = 'Telescope find files' }) + vim.keymap.set('n', 'fg', builtin.live_grep, { desc = 'Telescope live grep' }) + vim.keymap.set('n', 'fb', builtin.buffers, { desc = 'Telescope buffers' }) + vim.keymap.set('n', 'fh', builtin.help_tags, { desc = 'Telescope help tags' }) + end +} diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua new file mode 100644 index 0000000..c9f94e3 --- /dev/null +++ b/lua/plugins/treesitter.lua @@ -0,0 +1,13 @@ +return { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function() + local config = require("nvim-treesitter.configs") + + config.setup({ + auto_install = true, + indent = { enabled = true }, + highlight = { enabled = true } + }) + end +} diff --git a/lua/vim-options.lua b/lua/vim-options.lua new file mode 100644 index 0000000..695a269 --- /dev/null +++ b/lua/vim-options.lua @@ -0,0 +1,8 @@ +vim.cmd("set expandtab") +vim.cmd("set tabstop=2") +vim.cmd("set softtabstop=2") +vim.cmd("set shiftwidth=2") + +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" +vim.opt.wrap = false