diff --git a/stowers/nvim/dot-config/nvim/after/plugin/autopairs.lua b/stowers/nvim/dot-config/nvim/after/plugin/autopairs.lua deleted file mode 100644 index ba62d44..0000000 --- a/stowers/nvim/dot-config/nvim/after/plugin/autopairs.lua +++ /dev/null @@ -1 +0,0 @@ -require("nvim-autopairs").setup {} diff --git a/stowers/nvim/dot-config/nvim/after/plugin/blamer.vim b/stowers/nvim/dot-config/nvim/after/plugin/blamer.vim deleted file mode 100644 index 72ad485..0000000 --- a/stowers/nvim/dot-config/nvim/after/plugin/blamer.vim +++ /dev/null @@ -1 +0,0 @@ -let g:blamer_enabled = 1 diff --git a/stowers/nvim/dot-config/nvim/after/plugin/harpoon.lua b/stowers/nvim/dot-config/nvim/after/plugin/harpoon.lua deleted file mode 100644 index 6a19011..0000000 --- a/stowers/nvim/dot-config/nvim/after/plugin/harpoon.lua +++ /dev/null @@ -1,26 +0,0 @@ -local harpoon = require("harpoon") - -harpoon:setup() - --- basic telescope configuration -local conf = require("telescope.config").values -local function toggle_telescope(harpoon_files) - local file_paths = {} - for _, item in ipairs(harpoon_files.items) do - table.insert(file_paths, item.value) - end - - require("telescope.pickers").new({}, { - prompt_title = "Harpoon", - finder = require("telescope.finders").new_table({ - results = file_paths, - }), - previewer = conf.file_previewer({}), - sorter = conf.generic_sorter({}), - }):find() -end - -vim.keymap.set("n", "fh", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end) -vim.keymap.set("n", "ha", function() harpoon:list():add() end) -vim.keymap.set("n", "hd", function() harpoon:list():remove() end) -vim.keymap.set("n", "hc", function() harpoon:list():clear() end) diff --git a/stowers/nvim/dot-config/nvim/after/plugin/indent-o-matic.lua b/stowers/nvim/dot-config/nvim/after/plugin/indent-o-matic.lua deleted file mode 100644 index 093de12..0000000 --- a/stowers/nvim/dot-config/nvim/after/plugin/indent-o-matic.lua +++ /dev/null @@ -1,10 +0,0 @@ -require('indent-o-matic').setup { - -- Number of lines without indentation before giving up. - max_lines = 2048, - - -- Space indentation defaults. - standard_widths = { 2, 4, 8 }, - - -- Skip multi line comments and strings. - skip_multiline = true, -} diff --git a/stowers/nvim/dot-config/nvim/after/plugin/lsp.lua b/stowers/nvim/dot-config/nvim/after/plugin/lsp.lua deleted file mode 100644 index 457d691..0000000 --- a/stowers/nvim/dot-config/nvim/after/plugin/lsp.lua +++ /dev/null @@ -1,48 +0,0 @@ -local lsp = require("lsp-zero") - -lsp.on_attach(function(_client, bufnr) - lsp.default_keymaps({bufnr = bufnr}) - - vim.keymap.set("n", "cs", vim.lsp.buf.signature_help, {buffer = bufnr}) - vim.keymap.set("n", "cr", vim.lsp.buf.rename, {buffer = bufnr}) - vim.keymap.set("n", "ca", vim.lsp.buf.code_action, {buffer = bufnr}) - vim.keymap.set("n", "cf", vim.lsp.buf.format, {buffer = bufnr}) -end) - -require("mason").setup({}) -require("mason-lspconfig").setup({ - ensure_installed = {}, - handlers = { - lsp.default_setup, - }, -}) - -local lspconfig = require("lspconfig") -lspconfig.yamlls.setup { - settings = { - yaml = { - schemaStore = { - enable = false, - url = "", - }, - schemas = require("schemastore").yaml.schemas(), - }, - }, -} - -lspconfig.jsonls.setup { - settings = { - json = { - schemas = require("schemastore").json.schemas(), - validate = { enable = true, }, - }, - }, -} - -local cmp = require("cmp") -cmp.setup({ - mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.confirm({select = false}), - [''] = cmp.mapping.complete(), - }), -}) diff --git a/stowers/nvim/dot-config/nvim/after/plugin/lualine.lua b/stowers/nvim/dot-config/nvim/after/plugin/lualine.lua deleted file mode 100644 index c200066..0000000 --- a/stowers/nvim/dot-config/nvim/after/plugin/lualine.lua +++ /dev/null @@ -1 +0,0 @@ -require("lualine").setup {} diff --git a/stowers/nvim/dot-config/nvim/after/plugin/nvim-tree.lua b/stowers/nvim/dot-config/nvim/after/plugin/nvim-tree.lua deleted file mode 100644 index 6c1c16d..0000000 --- a/stowers/nvim/dot-config/nvim/after/plugin/nvim-tree.lua +++ /dev/null @@ -1,22 +0,0 @@ --- Disable netrw at nvim start. -vim.g.loaded_netrw = 1 -vim.g.loaded_netrwPlugin = 1 - --- Set term gui colours -vim.opt.termguicolors = true - --- Use defaults -require('nvim-tree').setup({ - actions = { - open_file = { - quit_on_open = true, - }, - }, - view = { - side = "right", - width = 50, - }, - git = { - ignore = false, - }, -}) diff --git a/stowers/nvim/dot-config/nvim/after/plugin/telescope.lua b/stowers/nvim/dot-config/nvim/after/plugin/telescope.lua deleted file mode 100644 index aa90eeb..0000000 --- a/stowers/nvim/dot-config/nvim/after/plugin/telescope.lua +++ /dev/null @@ -1,7 +0,0 @@ -local builtin = require('telescope.builtin') -vim.keymap.set('n', 'ff', builtin.git_files, {}) -vim.keymap.set('n', 'fF', builtin.find_files, {}) -vim.keymap.set('n', 'fG', builtin.live_grep, {}) -vim.keymap.set('n', 'fb', builtin.buffers, {}) -vim.keymap.set('n', 'fc', builtin.commands, {}) -vim.keymap.set('n', 'fC', builtin.colorscheme, {}) diff --git a/stowers/nvim/dot-config/nvim/after/plugin/treesitter.lua b/stowers/nvim/dot-config/nvim/after/plugin/treesitter.lua deleted file mode 100644 index d2c8e14..0000000 --- a/stowers/nvim/dot-config/nvim/after/plugin/treesitter.lua +++ /dev/null @@ -1,27 +0,0 @@ -require'nvim-treesitter.configs'.setup { - -- A list of parser names, or "all" - ensure_installed = { "jsonc" }, - - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, - - -- Automatically install missing parsers when entering buffer - -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally - auto_install = true, - - highlight = { - enable = true, - - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, - - -- Indentation is disabled by default. - -- enable it. - indent = { - enable = true, - }, -} diff --git a/stowers/nvim/dot-config/nvim/after/plugin/undotree.lua b/stowers/nvim/dot-config/nvim/after/plugin/undotree.lua deleted file mode 100644 index 62262a8..0000000 --- a/stowers/nvim/dot-config/nvim/after/plugin/undotree.lua +++ /dev/null @@ -1 +0,0 @@ -vim.keymap.set('n', 'cu', vim.cmd.UndotreeToggle) diff --git a/stowers/nvim/dot-config/nvim/lazy-lock.json b/stowers/nvim/dot-config/nvim/lazy-lock.json new file mode 100644 index 0000000..38c7009 --- /dev/null +++ b/stowers/nvim/dot-config/nvim/lazy-lock.json @@ -0,0 +1,19 @@ +{ + "blamer.nvim": { "branch": "master", "commit": "920eee3913091bd929d83e7bf52a815351a0559c" }, + "indent-o-matic": { "branch": "master", "commit": "4d11e98f523d3c4500b1dc33f0d1a248a4f69719" }, + "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "43894adcf10bb1190c2184bd7c1750e8ea2b3dce" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "neovim": { "branch": "main", "commit": "14b371fb783a8cfdade04544fb782f0bb6f7c904" }, + "nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" }, + "nvim-cmp": { "branch": "main", "commit": "ed31156aa2cc14e3bc066c59357cc91536a2bc01" }, + "nvim-lspconfig": { "branch": "master", "commit": "4ae9796c4e95ca84ec77946a9f9089b8f1a3eec9" }, + "nvim-tree.lua": { "branch": "master", "commit": "c7639482a1598f4756798df1b2d72f79fe5bb34f" }, + "nvim-treesitter": { "branch": "master", "commit": "cfc6f2c117aaaa82f19bcce44deec2c194d900ab" }, + "nvim-web-devicons": { "branch": "master", "commit": "edbe0a65cfacbbfff6a4a1e98ddd60c28c560509" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "schemastore.nvim": { "branch": "main", "commit": "3944983d4194a29730742c908e58b48ad1f51cbf" }, + "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, + "undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" }, + "vim-gitgutter": { "branch": "main", "commit": "7b0b5098e3e57be86bb96cfbf2b8902381eef57c" } +} diff --git a/stowers/nvim/dot-config/nvim/lua/eyedevelop/init.lua b/stowers/nvim/dot-config/nvim/lua/eyedevelop/init.lua index 8fb9139..665b609 100644 --- a/stowers/nvim/dot-config/nvim/lua/eyedevelop/init.lua +++ b/stowers/nvim/dot-config/nvim/lua/eyedevelop/init.lua @@ -1,5 +1,5 @@ -require('eyedevelop.packer') require('eyedevelop.remap') -require('eyedevelop.theme') + +require('eyedevelop.pm') require('eyedevelop.settings') diff --git a/stowers/nvim/dot-config/nvim/lua/eyedevelop/packer.lua b/stowers/nvim/dot-config/nvim/lua/eyedevelop/packer.lua deleted file mode 100644 index 2a91176..0000000 --- a/stowers/nvim/dot-config/nvim/lua/eyedevelop/packer.lua +++ /dev/null @@ -1,114 +0,0 @@ --- This file can be loaded by calling `lua require("plugins")` from your init.vim - --- Bootstrap packer -local ensure_packer = function() - local packer_path = vim.fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" - if vim.fn.empty(vim.fn.glob(packer_path)) > 0 then - print("Installing Packer...") - vim.fn.system({ - "git", - "clone", - "--depth=1", - "https://github.com/wbthomason/packer.nvim", - packer_path - }) - vim.cmd [[packadd packer.nvim]] - return true - end - - return false -end - -local packer_bootstrap = ensure_packer() - -return require("packer").startup(function(use) - -- Packer can manage itself - use "wbthomason/packer.nvim" - - -- Fuzzy finder - use { - "nvim-telescope/telescope.nvim", tag = "0.1.6", - requires = { { "nvim-lua/plenary.nvim" } } - } - - -- Colour theme - use { - "rose-pine/neovim", tag = "v3.0.1", - } - - use { - "nvim-lualine/lualine.nvim", branch = "master", - } - - -- TreeSitter - use { - "nvim-treesitter/nvim-treesitter", tag = "v0.9.2", - run = function() - local ts_update = require("nvim-treesitter.install").update({ with_sync = true }) - ts_update() - end, - } - - -- UndoTree - use { - "mbbill/undotree", tag = "rel_6.1", - } - - -- LSP - use { - "VonHeikemen/lsp-zero.nvim", - branch = "v3.x", - requires = { - -- LSP Support - { "neovim/nvim-lspconfig" }, - { "williamboman/mason.nvim" }, - { "williamboman/mason-lspconfig.nvim" }, - - -- Autocompletion - { "hrsh7th/nvim-cmp" }, - { "hrsh7th/cmp-nvim-lsp" }, - { "L3MON4D3/LuaSnip" }, - - -- Json/Yaml schemas - { "b0o/schemastore.nvim", branch = "main" }, - } - } - - -- File manager - use { - "nvim-tree/nvim-tree.lua", tag = "v1.2", - } - use { - "nvim-tree/nvim-web-devicons" - } - - -- Harpoon - use { - "ThePrimeagen/harpoon", - branch = "harpoon2", - requires = { { "nvim-lua/plenary.nvim" } } - } - - -- Git stuff - use { - "APZelos/blamer.nvim", tag = "v1.3.0", - } - - use { - "airblade/vim-gitgutter", branch = "main", - } - - -- Automatically set indent values - use { - "Darazaki/indent-o-matic" - } - - -- Auto match brackets. - use { - "windwp/nvim-autopairs", - } - - if packer_bootstrap then - require("packer").sync() - end -end) diff --git a/stowers/nvim/dot-config/nvim/lua/eyedevelop/plugins/code.lua b/stowers/nvim/dot-config/nvim/lua/eyedevelop/plugins/code.lua new file mode 100644 index 0000000..332543e --- /dev/null +++ b/stowers/nvim/dot-config/nvim/lua/eyedevelop/plugins/code.lua @@ -0,0 +1,146 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + lazy = true, + tag = "v0.9.3", + build = ":TSUpdate", + config = function() + local configs = require("nvim-treesitter.configs") + configs.setup({ + ensure_installed = { "jsonc", "lua" }, + sync_install = false, + auto_install = true, + + highlight = { + enable = true, + additional_vim_regex_highlighting = false + }, + + indent = { + enable = true, + }, + }) + end, + }, + + { + "Darazaki/indent-o-matic", + opts = { + max_lines = 2048, + standard_widths = { 2, 4, 8, }, + skip_multiline = true, + }, + }, + + { + "windwp/nvim-autopairs", + config = true, + }, + + { + "hrsh7th/nvim-cmp", + lazy = true, + event = "InsertEnter", + config = function() + local cmp = require("cmp") + + cmp.setup({ + sources = { + { name = "nvim_lsp" }, + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.confirm({ select = false }), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + }), + snippet = { + expand = function(args) + vim.snippet.expand(args.body) + end, + }, + }) + end, + }, + + { + "williamboman/mason.nvim", + lazy = true, + config = true, + }, + { + "williamboman/mason-lspconfig.nvim", + lazy = true, + config = true, + }, + + { + "b0o/schemastore.nvim", + lazy = true, + }, + + { + "neovim/nvim-lspconfig", + lazy = true, + cmd = "LspInfo", + event = { "BufReadPre", "BufNewFile", }, + dependencies = { + { "hrsh7th/nvim-cmp" }, + { "williamboman/mason.nvim" }, + { "williamboman/mason-lspconfig.nvim" }, + { "b0o/schemastore.nvim" }, + }, + init = function() + vim.opt.signcolumn = "yes" + end, + config = function() + local lsp_defaults = require("lspconfig").util.default_config + + lsp_defaults.capabilities = vim.tbl_deep_extend( + "force", + lsp_defaults.capabilities, + require("cmp_nvim_lsp").default_capabilities() + ) + + vim.api.nvim_create_autocmd("LspAttach", { + desc = "LSP actions", + callback = function(event) + local opts = { buffer = event.buf } + + vim.keymap.set({ "n", "i" }, "", "lua vim.lsp.buf.signature_help()", opts) + vim.keymap.set("n", "cr", "lua vim.lsp.buf.rename()", opts) + vim.keymap.set("n", "ca", "lua vim.lsp.buf.code_action()", opts) + vim.keymap.set({ "n", "x" }, "cf", "lua vim.lsp.format({async = true})", opts) + + vim.keymap.set("n", "K", "lua vim.lsp.buf.hover()", opts) + vim.keymap.set("n", "gd", "lua vim.lsp.buf.definition()", opts) + vim.keymap.set("n", "gD", "lua vim.lsp.buf.declaration()", opts) + vim.keymap.set("n", "gi", "lua vim.lsp.buf.implementation()", opts) + vim.keymap.set("n", "go", "lua vim.lsp.buf.type_definition()", opts) + vim.keymap.set("n", "gr", "lua vim.lsp.buf.references()", opts) + end, + }) + + require("lspconfig").yamlls.setup({ + settings = { + yaml = { + schemaStore = { + enable = false, + url = "", + }, + schemas = require("schemastore").yaml.schemas(), + }, + }, + }) + + require("lspconfig").jsonls.setup({ + settings = { + json = { + schemas = require("schemastore").json.schemas(), + validate = { enable = true, }, + }, + }, + }) + end, + }, +} diff --git a/stowers/nvim/dot-config/nvim/lua/eyedevelop/plugins/init.lua b/stowers/nvim/dot-config/nvim/lua/eyedevelop/plugins/init.lua new file mode 100644 index 0000000..a564707 --- /dev/null +++ b/stowers/nvim/dot-config/nvim/lua/eyedevelop/plugins/init.lua @@ -0,0 +1 @@ +return {} diff --git a/stowers/nvim/dot-config/nvim/lua/eyedevelop/plugins/navigation.lua b/stowers/nvim/dot-config/nvim/lua/eyedevelop/plugins/navigation.lua new file mode 100644 index 0000000..0127192 --- /dev/null +++ b/stowers/nvim/dot-config/nvim/lua/eyedevelop/plugins/navigation.lua @@ -0,0 +1,56 @@ +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", "ff", builtin.git_files, {}) + vim.keymap.set("n", "fF", builtin.find_files, {}) + vim.keymap.set("n", "fG", builtin.live_grep, {}) + vim.keymap.set("n", "fb", builtin.buffers, {}) + vim.keymap.set("n", "fc", builtin.commands, {}) + vim.keymap.set("n", "fC", builtin.colorscheme, {}) + end + }, + + { + "mbbill/undotree", + config = function() + vim.keymap.set("n", "cu", vim.cmd.UndotreeToggle) + end + }, + + { + "nvim-tree/nvim-tree.lua", + tag = "v1.8.0", + lazy = false, + dependencies = { + { "nvim-tree/nvim-web-devicons" }, + }, + opts = { + actions = { + open_file = { + quit_on_open = true, + }, + }, + view = { + side = "right", + width = 50, + }, + git = { + ignore = false, + }, + }, + config = function(_, opts) + vim.g.loaded_netrw = 1 + vim.g.loaded_netrwPlugin = 1 + vim.opt.termguicolors = true + + require("nvim-tree").setup(opts) + end + }, +} diff --git a/stowers/nvim/dot-config/nvim/lua/eyedevelop/plugins/theming.lua b/stowers/nvim/dot-config/nvim/lua/eyedevelop/plugins/theming.lua new file mode 100644 index 0000000..411218f --- /dev/null +++ b/stowers/nvim/dot-config/nvim/lua/eyedevelop/plugins/theming.lua @@ -0,0 +1,37 @@ +return { + { + "rose-pine/neovim", + tag = "v3.0.1", + lazy = false, + priority = 1000, + opts = { + variant = "main", + dark_variant = "main", + dim_inactive_windows = false, + extend_background_behind_borders = true, + + enable = { + terminal = true, + legacy_highlights = true, + migrations = true, + }, + + styles = { + bold = true, + italic = true, + transparency = false, + } + }, + config = function() + -- Load immediately + vim.cmd([[colorscheme rose-pine]]) + end, + }, + + { + "nvim-lualine/lualine.nvim", + lazy = false, + priority = 999, + config = true, + }, +} diff --git a/stowers/nvim/dot-config/nvim/lua/eyedevelop/plugins/vcs.lua b/stowers/nvim/dot-config/nvim/lua/eyedevelop/plugins/vcs.lua new file mode 100644 index 0000000..eca5f43 --- /dev/null +++ b/stowers/nvim/dot-config/nvim/lua/eyedevelop/plugins/vcs.lua @@ -0,0 +1,13 @@ +return { + { + "APZelos/blamer.nvim", + tag = "v1.3.0", + config = function() + vim.g.blamer_enabled = true + end, + }, + + { + "airblade/vim-gitgutter", + }, +} diff --git a/stowers/nvim/dot-config/nvim/lua/eyedevelop/pm.lua b/stowers/nvim/dot-config/nvim/lua/eyedevelop/pm.lua new file mode 100644 index 0000000..8433d8b --- /dev/null +++ b/stowers/nvim/dot-config/nvim/lua/eyedevelop/pm.lua @@ -0,0 +1,26 @@ +-- Bootstrap lazy.nvim +local pm_path = vim.fn.stdpath("data") .. "lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(pm_path) then + local pm_repo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", pm_repo, pm_path }) + 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(pm_path) + +require("lazy").setup({ + spec = { + { import = "eyedevelop.plugins" }, + }, + + install = { colorscheme = { "rose-pine" } }, + checker = { enabled = true }, +}) diff --git a/stowers/nvim/dot-config/nvim/lua/eyedevelop/theme.lua b/stowers/nvim/dot-config/nvim/lua/eyedevelop/theme.lua deleted file mode 100644 index 02d6a3e..0000000 --- a/stowers/nvim/dot-config/nvim/lua/eyedevelop/theme.lua +++ /dev/null @@ -1,20 +0,0 @@ -require('rose-pine').setup({ - variant = "main", - dark_variant = "main", - dim_inactive_windows = false, - extend_background_behind_borders = true, - - enable = { - terminal = true, - legacy_highlights = true, - migrations = true, - }, - - styles = { - bold = true, - italic = true, - transparency = false, - } -}) - -vim.cmd("colorscheme rose-pine")