From 413750ce81b88c032645c3f5a1cf92d044d6609e Mon Sep 17 00:00:00 2001 From: arcayr Date: Wed, 25 Jun 2025 13:39:51 +1000 Subject: [PATCH] initial commit --- README.md | 4 ++++ init.lua | 3 +++ lazy-lock.json | 11 +++++++++ lua/config/lazy.lua | 22 ++++++++++++++++++ lua/config/nvim.lua | 40 +++++++++++++++++++++++++++++++++ lua/plugins/adwaita.lua | 10 +++++++++ lua/plugins/blink.lua | 11 +++++++++ lua/plugins/mason.lua | 27 ++++++++++++++++++++++ lua/plugins/nvim-treesitter.lua | 9 ++++++++ lua/plugins/telescope.lua | 17 ++++++++++++++ 10 files changed, 154 insertions(+) create mode 100644 README.md create mode 100644 init.lua create mode 100644 lazy-lock.json create mode 100644 lua/config/lazy.lua create mode 100644 lua/config/nvim.lua create mode 100644 lua/plugins/adwaita.lua create mode 100644 lua/plugins/blink.lua create mode 100644 lua/plugins/mason.lua create mode 100644 lua/plugins/nvim-treesitter.lua create mode 100644 lua/plugins/telescope.lua diff --git a/README.md b/README.md new file mode 100644 index 0000000..7080d4d --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# nvim.arc + +relatively lightweight neovim plugins and configuration. + diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..6e9f1c8 --- /dev/null +++ b/init.lua @@ -0,0 +1,3 @@ +require("config.nvim") +require("config.lazy") + diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 0000000..2f95c9d --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,11 @@ +{ + "adwaita.nvim": { "branch": "main", "commit": "29005f0b66151be26c13eca5755933ade0989572" }, + "blink.cmp": { "branch": "main", "commit": "3513b27d1565d09927ccb8c81731ee06dab6c1c7" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "c4c84f4521d62de595c0d0f718a9a40c1890c8ce" }, + "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" }, + "nvim-lspconfig": { "branch": "master", "commit": "2d0ca00368742c0c7af802b9b2a920c4cd02303a" }, + "nvim-treesitter": { "branch": "main", "commit": "98459ffcf7dfbeea83081166a2d732a8083a91c2" }, + "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" } +} diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua new file mode 100644 index 0000000..90eca15 --- /dev/null +++ b/lua/config/lazy.lua @@ -0,0 +1,22 @@ +-- Bootstrap lazy.nvim +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) + +-- Setup lazy.nvim +require("lazy").setup({ + spec = {{ import = "plugins" }}, + checker = { enabled = false }, +}) diff --git a/lua/config/nvim.lua b/lua/config/nvim.lua new file mode 100644 index 0000000..6d50b8e --- /dev/null +++ b/lua/config/nvim.lua @@ -0,0 +1,40 @@ +-- tabstops -> 4 spaces +vim.o.tabstop = 4 +vim.o.expandtab = true +vim.o.softtabstop = 4 +vim.o.shiftwidth = 4 + +-- disable netrw in favour of telescope +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 + +-- colours +vim.o.background = "light" +vim.opt.termguicolors = true +vim.opt.relativenumber = true +vim.opt.signcolumn = "number" + +-- line numbers +vim.opt.number = true +vim.opt.relativenumber = true +vim.opt.signcolumn = "number" + +-- allow virtual lines for lsp inline warnings/errors +vim.diagnostic.config({ virtual_lines = true }) +vim.diagnostic.config({ virtual_text = true }) + +-- custom keymaps +-- keymaps for plugins are defined in the plugin config. + +-- keep neovide-specifics neovide-specific +if not vim.g.neovide then + -- disable cursor animations + vim.g.neovide_position_animation_length = 0 + vim.g.neovide_cursor_animation_length = 0.00 + vim.g.neovide_cursor_trail_size = 0 + vim.g.neovide_cursor_animate_in_insert_mode = false + + vim.g.neovide_cursor_animate_command_line = false + vim.g.neovide_scroll_animation_far_lines = 0 + vim.g.neovide_scroll_animation_length = 0.00 +end diff --git a/lua/plugins/adwaita.lua b/lua/plugins/adwaita.lua new file mode 100644 index 0000000..59a5bf1 --- /dev/null +++ b/lua/plugins/adwaita.lua @@ -0,0 +1,10 @@ +return { + { + "Mofiqul/adwaita.nvim", + lazy = false, + priority = 1000, + config = function() + vim.cmd("colorscheme adwaita") + end + } +} diff --git a/lua/plugins/blink.lua b/lua/plugins/blink.lua new file mode 100644 index 0000000..d624f25 --- /dev/null +++ b/lua/plugins/blink.lua @@ -0,0 +1,11 @@ +return { + "saghen/blink.cmp", + event = "VeryLazy", + opts = { + fuzzy = { implementation = "lua" }, + completion = { documentation = { auto_show = true } }, + signature = { enabled = true } + }, + opts_extend = { "sources.default" } +} + diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua new file mode 100644 index 0000000..0ac80c4 --- /dev/null +++ b/lua/plugins/mason.lua @@ -0,0 +1,27 @@ +return { + { + "mason-org/mason.nvim", + config = function() + require("mason").setup() + end + }, + { + "mason-org/mason-lspconfig.nvim", + dependencies = { + "neovim/nvim-lspconfig", + "mason-org/mason.nvim", + }, + event = "BufReadPost", + opts = function() + return { + ensure_installed = { "rust_analyzer", "lua_ls", "gopls" }, + automatic_installation = true, + handlers = { + function(sn) + require("lspconfig")[sn].setup() + end + } + } + end + } +} diff --git a/lua/plugins/nvim-treesitter.lua b/lua/plugins/nvim-treesitter.lua new file mode 100644 index 0000000..6f32ace --- /dev/null +++ b/lua/plugins/nvim-treesitter.lua @@ -0,0 +1,9 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + branch = "main", + lazy = false, + build = ":TSUpdate" + } +} + diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua new file mode 100644 index 0000000..43fc666 --- /dev/null +++ b/lua/plugins/telescope.lua @@ -0,0 +1,17 @@ +return { + { + "nvim-telescope/telescope.nvim", + dependencies = { + "nvim-lua/plenary.nvim" + }, + keys = function() + local builtin = require("telescope.builtin") + return { + { "ff", builtin.find_files, { desc = "Telescope find files" } }, + { "fg", builtin.live_grep, { desc = "Telescope live grep" } }, + { "fb", builtin.buffers, { desc = "Telescope buffers" } }, + { "fh", builtin.help_tags, { desc = "Telescope help tags" } } + } + end + } +}