Skip to content

Commit 8b442ae

Browse files
committed
modernize the setup
1 parent b2f54d0 commit 8b442ae

28 files changed

+326
-328
lines changed

.luarc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"diagnostics.globals": [
3+
"vim",
4+
"Snacks"
5+
]
6+
}

init.lua

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
require "base"
2-
require "filetypes"
3-
require "hard_mode"
4-
require "keybindings"
5-
require "plugins"
1+
require "config.lazy"

lazy-lock.json

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,20 @@
11
{
2-
"bufdelete.nvim": { "branch": "master", "commit": "f6bcea78afb3060b198125256f897040538bcb81" },
3-
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
4-
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
5-
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
6-
"copilot.vim": { "branch": "release", "commit": "782461159655b259cff10ecff05efa761e3d4764" },
7-
"debugpy.nvim": { "branch": "master", "commit": "490a0d7bfa23af8c6096bb3fbd867770b7d4a28b" },
8-
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
9-
"fzf-lua": { "branch": "main", "commit": "780899604e0ce490d0d8e402a2fcdbad1cd7c9b8" },
10-
"gitsigns.nvim": { "branch": "main", "commit": "863903631e676b33e8be2acb17512fdc1b80b4fb" },
11-
"lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" },
12-
"lspkind-nvim": { "branch": "master", "commit": "59c3f419af48a2ffb2320cea85e44e5a95f71664" },
13-
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
14-
"mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
15-
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" },
2+
"blink.cmp": { "branch": "main", "commit": "5f442681df24fe705d1ee7ce5b4d435aa4b4dee4" },
3+
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
4+
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" },
5+
"lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" },
6+
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
7+
"mason-lspconfig.nvim": { "branch": "main", "commit": "c6c686781f9841d855bf1b926e10aa5e19430a38" },
168
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
17-
"neogit": { "branch": "master", "commit": "75ee709d18625a94aef90d94ccac4e562c9a0046" },
189
"null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" },
19-
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
20-
"nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" },
21-
"nvim-dap-ui": { "branch": "master", "commit": "1c351e4e417d4691da12948b6ecf966936a56d28" },
22-
"nvim-lspconfig": { "branch": "master", "commit": "77029ece81b69208ffcc16f150d0946d54015a14" },
23-
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
24-
"nvim-treesitter": { "branch": "master", "commit": "140f534ce9c02189921b80f5c8a68ab9e3f92ce8" },
25-
"nvim-web-devicons": { "branch": "master", "commit": "1e5a2a796a88b5d696acb07dd5c285b13d13da21" },
10+
"nvim-lspconfig": { "branch": "master", "commit": "8b15a1a597a59f4f5306fad9adfe99454feab743" },
11+
"nvim-tree.lua": { "branch": "master", "commit": "68fc4c20f5803444277022c681785c5edd11916d" },
12+
"nvim-treesitter": { "branch": "master", "commit": "7e0fcf0d456fc5818da1af35b1a3f5c784fce457" },
13+
"nvim-web-devicons": { "branch": "master", "commit": "63f552a7f59badc6e6b6d22e603150f0d5abebb7" },
2614
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
2715
"rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" },
28-
"telescope.nvim": { "branch": "master", "commit": "cb3f98d935842836cc115e8c9e4b38c1380fbb6b" },
29-
"toggleterm.nvim": { "branch": "main", "commit": "137d06fb103952a0fb567882bb8527e2f92d327d" },
30-
"tokyonight.nvim": { "branch": "main", "commit": "817bb6ffff1b9ce72cdd45d9fcfa8c9cd1ad3839" },
31-
"vim-just": { "branch": "main", "commit": "8ed1e472b72b739bd852d2b9a2d688b3da015cf5" },
32-
"vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" },
33-
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
34-
"vim-terraform": { "branch": "master", "commit": "24de93afb05078bac6a2e966402cc1f672277708" }
16+
"snacks.nvim": { "branch": "main", "commit": "98df370703b3c47a297988f3e55ce99628639590" },
17+
"telescope.nvim": { "branch": "master", "commit": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc" },
18+
"theme": { "branch": "main", "commit": "f67b886d65a029f12ffa298701fb8f1efd89295d" },
19+
"tokyonight.nvim": { "branch": "main", "commit": "45d22cf0e1b93476d3b6d362d720412b3d34465c" }
3520
}

lua/base.lua

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,3 @@ vim.cmd [[set laststatus=3]]
7070

7171
-- hide command bar by default
7272
vim.o.ch = 0
73-
74-
-- Theme
75-
vim.cmd [[set t_Co=256]]
76-
vim.cmd [[syntax on]]
77-
vim.cmd [[syntax enable]]

lua/cmp_setup.lua

Lines changed: 0 additions & 40 deletions
This file was deleted.

lua/completion_icons.lua

Lines changed: 0 additions & 30 deletions
This file was deleted.

lua/config/lazy.lua

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
-- Bootstrap lazy.nvim
2+
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
3+
if not (vim.uv or vim.loop).fs_stat(lazypath) then
4+
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
5+
local out = vim.fn.system { "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }
6+
if vim.v.shell_error ~= 0 then
7+
vim.api.nvim_echo({
8+
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
9+
{ out, "WarningMsg" },
10+
{ "\nPress any key to exit..." },
11+
}, true, {})
12+
vim.fn.getchar()
13+
os.exit(1)
14+
end
15+
end
16+
vim.opt.rtp:prepend(lazypath)
17+
18+
-- Make sure to setup `mapleader` and `maplocalleader` before
19+
-- loading lazy.nvim so that mappings are correct.
20+
-- This is also a good place to setup other settings (vim.opt)
21+
vim.g.mapleader = " "
22+
vim.g.maplocalleader = ","
23+
24+
require "base"
25+
require "filetypes"
26+
require "hard_mode"
27+
require "keybindings"
28+
29+
-- Setup lazy.nvim
30+
require("lazy").setup {
31+
spec = {
32+
-- import your plugins
33+
{ import = "plugins" },
34+
},
35+
-- Configure any other settings here. See the documentation for more details.
36+
-- colorscheme that will be used when installing plugins.
37+
-- install = { colorscheme = { "folke/tokyonight.nvim" } },
38+
-- automatically check for plugin updates
39+
checker = { enabled = true, notify = false },
40+
change_detection = { enabled = false },
41+
}

lua/devicons_setup.lua

Lines changed: 0 additions & 9 deletions
This file was deleted.

lua/keybindings.lua

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,9 @@ vim.cmd [[command Wq wq]]
1616
vim.cmd [[command Wqa wqa]]
1717

1818
-- Basic buffer key bindings
19-
vim.cmd [[nnoremap gc :Bdelete<cr>]]
2019
vim.cmd [[nnoremap gn :bn<cr>]]
2120
vim.cmd [[nnoremap gN :bp<cr>]]
2221

23-
-- Delete all buffers but the current
24-
vim.cmd [[command! BufOnly execute '%bdelete|edit #|normal `"']]
25-
vim.cmd [[nnoremap gC :BufOnly<cr>]]
26-
27-
-- Terminal
28-
vim.cmd [[tnoremap <Esc> <C-\><C-n>]]
29-
3022
local open_diagnostics = function()
3123
vim.diagnostic.open_float(0, { scope = "line" })
3224
end
@@ -39,13 +31,3 @@ vim.keymap.set("n", "gR", vim.lsp.buf.rename, { silent = true })
3931
vim.keymap.set("n", "<space>]", vim.diagnostic.goto_next, { silent = true })
4032
vim.keymap.set("n", "<space>.", vim.lsp.buf.code_action, { silent = true })
4133
vim.keymap.set("n", "<space>e", open_diagnostics, { silent = true })
42-
43-
-- Git
44-
vim.cmd [[nnoremap <silent> <space>gr <cmd>Gitsigns reset_hunk<CR>]]
45-
vim.cmd [[vnoremap <silent> <space>gr <cmd>'<,'>Gitsigns reset_hunk<CR>]]
46-
47-
-- Toggleterm
48-
vim.cmd [[tnoremap <C-q> <cmd>:ToggleTerm<CR>]]
49-
vim.cmd [[nnoremap <C-q> <cmd>:ToggleTerm<CR>]]
50-
51-
vim.api.nvim_set_keymap("n", "<C-d>", ":NvimTreeToggle<CR>", { noremap = true })

lua/neogit_setup.lua

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)