diff --git a/.gitignore b/.gitignore index a074298..308fa39 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ nvim spell/ .DS_Store + +nvim.log diff --git a/NOTES.md b/NOTES.md new file mode 100644 index 0000000..63923a7 --- /dev/null +++ b/NOTES.md @@ -0,0 +1,20 @@ +# Keybinds + +## Lsp + +- grr : go to reference +- gri : go to impl +- grd : goto defn +- gO : open symbolds +- gW : open worksapce symbolds +- grt : goto type defn + +## Tabs + +There are :hsplit, :vsplit commands, also :tabnew + +Do leader-sf, C-t for new tab, C-v for vertical split, C-x for horizontal +These keybinds come from telescope defaults. The tab functionality is built into +neovim. + +Tab cycling: gt, gT diff --git a/init.lua b/init.lua index 80641c2..d96b84a 100644 --- a/init.lua +++ b/init.lua @@ -199,11 +199,11 @@ require('lazy').setup({ ---@diagnostic disable-next-line: missing-fields opts = { signs = { - add = { text = '+' }, ---@diagnostic disable-line: missing-fields - change = { text = '~' }, ---@diagnostic disable-line: missing-fields - delete = { text = '_' }, ---@diagnostic disable-line: missing-fields - topdelete = { text = '‾' }, ---@diagnostic disable-line: missing-fields - changedelete = { text = '~' }, ---@diagnostic disable-line: missing-fields + add = { text = '│' }, ---@diagnostic disable-line: missing-fields + change = { text = '│' }, ---@diagnostic disable-line: missing-fields + delete = { text = '│' }, ---@diagnostic disable-line: missing-fields + topdelete = { text = '│' }, ---@diagnostic disable-line: missing-fields + changedelete = { text = '│' }, ---@diagnostic disable-line: missing-fields }, }, }, @@ -884,7 +884,7 @@ require('lazy').setup({ -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! diff --git a/lazy-lock.json b/lazy-lock.json index 8c62d48..89905b8 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -10,6 +10,8 @@ "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" }, "mason.nvim": { "branch": "main", "commit": "12ddd182d9efbdc848b540f16484a583d52da0fb" }, "mini.nvim": { "branch": "main", "commit": "4f6f84a96b076747b736d100388a8d7844771d7d" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "84c75e7a7e443586f60508d12fc50f90d9aee14e" }, + "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, "nvim-lspconfig": { "branch": "master", "commit": "8fde495949782bb61c2605174e231d145a048d8c" }, "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, @@ -20,5 +22,6 @@ "telescope.nvim": { "branch": "master", "commit": "506338434fec5ad19cb1f8d45bf92d66c4917393" }, "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, "tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" }, + "vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } } diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index b3ddcfd..bfef146 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -5,4 +5,18 @@ ---@module 'lazy' ---@type LazySpec -return {} +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, + }, + { + 'tpope/vim-fugitive', + }, +} diff --git a/lua/custom/plugins/luasnip.lua b/lua/custom/plugins/luasnip.lua new file mode 100644 index 0000000..38fbf87 --- /dev/null +++ b/lua/custom/plugins/luasnip.lua @@ -0,0 +1,11 @@ +---@module 'lazy' +---@type LazySpec +return { + 'L3MON4D3/LuaSnip', + config = function(_, opts) + local luasnip = require 'luasnip' + + luasnip.config.setup(opts or {}) + require 'snippets.cpp' + end, +} diff --git a/lua/snippets/cpp.lua b/lua/snippets/cpp.lua new file mode 100644 index 0000000..c822af0 --- /dev/null +++ b/lua/snippets/cpp.lua @@ -0,0 +1,27 @@ +local ls = require 'luasnip' +local s = ls.snippet +local t = ls.text_node +local i = ls.insert_node + +ls.add_snippets('cpp', { + s('cp', { + t { + '#include ', + '#include ', + 'using namespace std;', + '', + 'typedef long long ll;', + '', + 'signed main() {', + ' ios::sync_with_stdio(false);', + ' cin.tie(nullptr);', + '', + ' ', + }, + i(0), + t { + '', + '}', + }, + }), +}) diff --git a/nvim.log b/nvim.log deleted file mode 100644 index f2093dd..0000000 --- a/nvim.log +++ /dev/null @@ -1 +0,0 @@ -WRN 2026-04-24T23:20:45.983 ?.43932 server_start:197: Failed to start server: operation not permitted: /var/folders/8l/vbk2xhz54cb1ljh4qy0xxnbw0000gn/T/nvim.zero/s3kTMC/nvim.43932.0