diff --git a/lazy-lock.json b/lazy-lock.json deleted file mode 100644 index 3cba8dd..0000000 --- a/lazy-lock.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "LuaSnip": { "branch": "master", "commit": "105b5f7f72c13e682a3aa5d29eac2408ae513b22" }, - "auto-save.nvim": { "branch": "main", "commit": "979b6c82f60cfa80f4cf437d77446d0ded0addf0" }, - "autoclose.nvim": { "branch": "main", "commit": "469782b0456f0b4f764378ffda94c18599544e09" }, - "ccc.nvim": { "branch": "main", "commit": "4a0ddaf787cc82796e84ab8a7f70d086f250aeb6" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, - "crates.nvim": { "branch": "main", "commit": "1dffccc0a95f656ebe00cacb4de282473430c5a1" }, - "glow.nvim": { "branch": "advanced_window", "commit": "f1157d4cb7e46e830c72004e7e1adb81a1f9b04c" }, - "indent-blankline.nvim": { "branch": "master", "commit": "7075d7861f7a6bbf0de0298c83f8a13195e6ec01" }, - "lazy.nvim": { "branch": "main", "commit": "0d61488b89a570415177f75a36ef93616aac6c77" }, - "lazygit.nvim": { "branch": "main", "commit": "3466e48439601445e26c65635421625886f2d0c0" }, - "lsp-inlayhints.nvim": { "branch": "main", "commit": "d981f65c9ae0b6062176f0accb9c151daeda6f16" }, - "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "4f1c72767bec31397d59554f84096909b2887195" }, - "mason-null-ls.nvim": { "branch": "main", "commit": "73c68abdf65279e41526eb152876511a8ae84ea2" }, - "mason.nvim": { "branch": "main", "commit": "b68d3be4b664671002221d43c82e74a0f1006b26" }, - "material.nvim": { "branch": "main", "commit": "f3783f2a8e55904887d3ea7cae8d7ab57d7f3e8e" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "20c2f2f5ba083bbb1e37b8bc3d590621434f31e9" }, - "neodev.nvim": { "branch": "main", "commit": "a2b1d8fb9fa4daa35d3fd9123bccccccbd4a3520" }, - "nerdcommenter": { "branch": "master", "commit": "ab2ae4d502a26bc591db78a8548823ddd04bbc9c" }, - "nui.nvim": { "branch": "main", "commit": "d146966a423e60699b084eeb28489fe3b6427599" }, - "null-ls.nvim": { "branch": "main", "commit": "aac27a1fa550de3d0b2c651168167cc0d5366a9a" }, - "nvim-cmp": { "branch": "main", "commit": "2743dd989e9b932e1b4813a4927d7b84272a14e2" }, - "nvim-lspconfig": { "branch": "master", "commit": "0011c435282f043a018e23393cae06ed926c3f4a" }, - "nvim-treesitter": { "branch": "master", "commit": "0522bbe90d6f9bb7080621fe70f8ab565e072b98" }, - "nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "7f625207f225eea97ef7a6abe7611e556c396d2f" }, - "nvim-web-devicons": { "branch": "master", "commit": "9ab9b0b894b2388a9dbcdee5f00ce72e25d85bf9" }, - "openingh.nvim": { "branch": "main", "commit": "2719e5759ecf4b9a2d492fbf52d03d2e6fc6126a" }, - "playground": { "branch": "master", "commit": "2b81a018a49f8e476341dfcb228b7b808baba68b" }, - "plenary.nvim": { "branch": "master", "commit": "102c02903c74b93c705406bf362049383abc87c8" }, - "rest.nvim": { "branch": "main", "commit": "aea7c64bdff1073beed9bd7fddb60cce7796d7ff" }, - "rust-tools.nvim": { "branch": "master", "commit": "71d2cf67b5ed120a0e31b2c8adb210dd2834242f" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" }, - "telescope.nvim": { "branch": "master", "commit": "c1a2af0af69e80e14e6b226d3957a064cd080805" }, - "text-case.nvim": { "branch": "main", "commit": "cd7cc65a412beb713e68f3b84e45990a939b7b6b" }, - "undotree": { "branch": "master", "commit": "485f01efde4e22cb1ce547b9e8c9238f36566f21" }, - "vim-fugitive": { "branch": "master", "commit": "43f18ab9155c853a84ded560c6104e6300ad41da" }, - "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" } -} \ No newline at end of file diff --git a/lua/autocommands.lua b/lua/autocommands.lua index 878ad69..a3ff827 100644 --- a/lua/autocommands.lua +++ b/lua/autocommands.lua @@ -33,11 +33,11 @@ vim.api.nvim_create_autocmd("BufRead", { end, }) -vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, { - callback = function () - if vim.bo.filetype == 'neo-tree' then - vim.api.nvim_command("stopinsert") - end +vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, { + callback = function() + -- if vim.bo.filetype == 'neo-tree' then + vim.api.nvim_command("stopinsert") + -- end end }) diff --git a/lua/plugins/git.lua b/lua/plugins/git.lua new file mode 100644 index 0000000..b28c41e --- /dev/null +++ b/lua/plugins/git.lua @@ -0,0 +1,98 @@ +return { + { + "lewis6991/gitsigns.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + opts = { + watch_gitdir = { + interval = 100 + }, + signs = { + add = { hl = "GitGutterAdd" }, + change = { hl = "GitGutterChange" }, + delete = { hl = "GitGutterDelete" }, + topdelete = { hl = "GitGutterDelete" }, + changedelete = { hl = "GitGutterChangeDelete" } + }, + current_line_blame_opts = { + virt_text = true, + virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' + delay = 0, + ignore_whitespace = false, + }, + -- on_attach = function() + -- local gs = package.loaded.gitsigns + -- set_nmap('tb', gs.toggle_current_line_blame) + -- end + } + }, + { + "Neogitorg/neogit", + dependencies = { + "nvim-lua/plenary.nvim", + }, + opts = { + integrations = { + diffview = true + }, + sections = { + recent = false + } + }, + keys = { + { "gs", function() + require('neogit').open({ kind = "vsplit" }) + end } + } + }, + { + + "sindrets/diffview.nvim", + opts = { + diff_binaries = false, + enhanced_diff_hl = true, + git_cmd = { "git" }, + use_icons = true, + icons = { + folder_closed = "", + folder_open = "", + }, + signs = { + fold_closed = "", + fold_open = "", + }, + view = { + merge_tool = { + layout = "diff3_mixed", + disable_diagnostics = true, + }, + }, + file_panel = { + listing_style = "tree", + tree_options = { + flatten_dirs = true, + folder_statuses = "only_folded", + }, + win_config = { + position = "left", + width = 35, + }, + }, + file_history_panel = { + log_options = { + git = { + single_file = { + diff_merges = "combined", + }, + multi_file = { + diff_merges = "first-parent", + }, + } + }, + win_config = { + position = "bottom", + height = 16, + }, + }, + } + } +} diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index f2c7487..3d3d534 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -76,6 +76,22 @@ local servers = { }, } +vim.lsp.handlers["textDocument/publishDiagnostics"] = + vim.lsp.with( + vim.lsp.diagnostic.on_publish_diagnostics, + { + virtual_text = true, + signs = true, + update_in_insert = true + } + ) + +local signs = { "Error", "Warn", "Hint", "Info" } +for _, type in pairs(signs) do + local hl = "DiagnosticSign" .. type + vim.fn.sign_define(hl, { text = "▊ ", texthl = hl, numhl = hl }) +end + -- LSP config -- Took lots of inspiration from this kickstart lua file: https://github.com/hjr3/dotfiles/blob/main/.config/nvim/init.lua diff --git a/lua/plugins/git_fugitive.lua b/lua/plugins_disabled/git_fugitive.lua similarity index 100% rename from lua/plugins/git_fugitive.lua rename to lua/plugins_disabled/git_fugitive.lua