diff --git a/nvim/init.lua b/nvim/init.lua index a695868..f9b01f0 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -1,38 +1,41 @@ local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) require("lazy").setup({ - spec = { - { import = "plugins"} - } + spec = { + { import = "plugins" }, + }, }) -if vim.g.neovide == true then - vim.api.nvim_set_keymap('n', "", ":let g:neovide_fullscreen = !g:neovide_fullscreen", {}) -end - vim.opt.splitright = true vim.opt.splitbelow = true -vim.opt.shiftwidth = 2 -vim.opt.cmdheight = 0 vim.opt.guifont = "jetbrains mono:h11" +vim.opt.cmdheight = 0 vim.opt.termguicolors = true vim.wo.number = true vim.opt.fillchars = { - vert = " " + vert = " ", } vim.diagnostic.config({ - virtual_text = true + virtual_text = true, }) -vim.cmd[[colorscheme dracula]] +vim.cmd([[colorscheme dracula]]) + +if vim.g.neovide == true then + vim.api.nvim_set_keymap("n", "", ":let g:neovide_fullscreen = !g:neovide_fullscreen", {}) + vim.keymap.set({ "n", "x" }, "", '"+y', { desc = "Copy system clipboard" }) + vim.keymap.set({ "n", "x" }, "", '"+p', { desc = "Paste system clipboard" }) + + vim.o.guifont = "jetbrains mono:h11" +end diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index 466f8a8..269253b 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -1,37 +1,37 @@ { - "LuaSnip": { "branch": "master", "commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc" }, - "barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" }, + "LuaSnip": { "branch": "master", "commit": "b84eeb3641b08324287587b426ec974b888390d9" }, + "barbar.nvim": { "branch": "master", "commit": "c20691d686addb0d6ea87896d186c082324b01f8" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "conform.nvim": { "branch": "master", "commit": "25d48271e3d4404ba017cb92a37d3a681c1ad149" }, + "conform.nvim": { "branch": "master", "commit": "d31323db3fa4a33d203dcb05150d98bd0153c42c" }, "dashboard-nvim": { "branch": "master", "commit": "fabf5feec96185817c732d47d363f34034212685" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, - "dracula.nvim": { "branch": "main", "commit": "3fbd3c2a4463e9da1c1ada3eb97e851c4f5c2b1a" }, - "dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" }, + "dracula.nvim": { "branch": "main", "commit": "fdf503e52ec1c8aae07353604d891fe5a3ed5201" }, + "dressing.nvim": { "branch": "master", "commit": "c5775a888adbc50652cb370073fcfec963eca93e" }, "friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" }, - "gitsigns.nvim": { "branch": "main", "commit": "f074844b60f9e151970fbcdbeb8a2cd52b6ef25a" }, + "gitsigns.nvim": { "branch": "main", "commit": "562dc47189ad3c8696dbf460d38603a74d544849" }, "glance.nvim": { "branch": "master", "commit": "51059bcf21016387b6233c89eed220cf47fca752" }, - "indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" }, + "indent-blankline.nvim": { "branch": "master", "commit": "dddb5d21811c319eb6e51a993d8fb44b193aae3f" }, "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, "legendary.nvim": { "branch": "master", "commit": "d2665ca760253c087a217b5e3968bbcc98f074de" }, - "lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" }, + "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "mkdnflow.nvim": { "branch": "main", "commit": "0fa1e682e35d46cd1a0102cedd05b0283e41d18d" }, + "mkdnflow.nvim": { "branch": "main", "commit": "4b8df635b0386d76544af2cbb0848d3d8a9cca8a" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" }, "neogit": { "branch": "master", "commit": "2b74a777b963dfdeeabfabf84d5ba611666adab4" }, "noice.nvim": { "branch": "main", "commit": "448bb9c524a7601035449210838e374a30153172" }, "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, - "nvim-autopairs": { "branch": "master", "commit": "e38c5d837e755ce186ae51d2c48e1b387c4425c6" }, - "nvim-cmp": { "branch": "main", "commit": "d818fd0624205b34e14888358037fb6f5dc51234" }, - "nvim-lspconfig": { "branch": "master", "commit": "f95d371c1a274f60392edfd8ea5121b42dca736e" }, + "nvim-autopairs": { "branch": "master", "commit": "48ca9aaee733911424646cb1605f27bc01dedbe3" }, + "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, + "nvim-lspconfig": { "branch": "master", "commit": "a89de2e049b5f89a0ee55029d5a31213bd4de6f8" }, "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, - "nvim-treesitter": { "branch": "master", "commit": "f97e0de0053df1cb3b9f74b9b1239acced1b7d9a" }, - "nvim-ts-autotag": { "branch": "main", "commit": "dc5e1687ab76ee02e0f11c5ce137f530b36e98b3" }, - "nvim-web-devicons": { "branch": "master", "commit": "a2af6aa13a2ad3ad361d562a319a91bcd68c43a4" }, + "nvim-treesitter": { "branch": "master", "commit": "ec8776ed9ef56ffe7a61e67b64d5d6b6aba2c631" }, + "nvim-ts-autotag": { "branch": "main", "commit": "0cb76eea80e9c73b88880f0ca78fbd04c5bdcac7" }, + "nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" }, "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, "symbol-usage.nvim": { "branch": "main", "commit": "533846260d3d053aebbf224617cc5294c219a8b1" }, - "telescope.nvim": { "branch": "master", "commit": "10b8a82b042caf50b78e619d92caf0910211973d" }, + "telescope.nvim": { "branch": "master", "commit": "5972437de807c3bc101565175da66a1aa4f8707a" }, "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" } -} \ No newline at end of file +} diff --git a/nvim/lua/plugins/barbar.lua b/nvim/lua/plugins/barbar.lua index 9ec503b..4143553 100644 --- a/nvim/lua/plugins/barbar.lua +++ b/nvim/lua/plugins/barbar.lua @@ -1,12 +1,17 @@ return { - 'romgrk/barbar.nvim', - dependencies = { - 'lewis6991/gitsigns.nvim', - 'nvim-tree/nvim-web-devicons' - }, - init = function () vim.g.barbar_auto_setup = false end, - opts = { - animation = true, - auto_hide = 0 - } + "romgrk/barbar.nvim", + dependencies = { + "lewis6991/gitsigns.nvim", + "nvim-tree/nvim-web-devicons", + }, + init = function() + vim.g.barbar_auto_setup = false + end, + opts = { + animation = true, + auto_hide = 1, + sidebar_filetypes = { + ["neo-tree"] = { event = "BufWipeout" }, + }, + }, } diff --git a/nvim/lua/plugins/conform.lua b/nvim/lua/plugins/conform.lua index fbd50ca..3e3d1df 100644 --- a/nvim/lua/plugins/conform.lua +++ b/nvim/lua/plugins/conform.lua @@ -1,9 +1,13 @@ return { - 'stevearc/conform.nvim', - opts = { - format_on_save = { - timeout_ms = 500, - lsp_format = "fallback" - } - } + "stevearc/conform.nvim", + opts = { + format_on_save = { + timeout_ms = 500, + lsp_format = "fallback", + }, + formatters_by_ft = { + lua = { "stylua" }, + rust = { "rustfmt", lsp_format = "fallback" }, + }, + }, } diff --git a/nvim/lua/plugins/dracula.lua b/nvim/lua/plugins/dracula.lua index acd8f50..405b855 100644 --- a/nvim/lua/plugins/dracula.lua +++ b/nvim/lua/plugins/dracula.lua @@ -1,5 +1,5 @@ return { - "binhtran432k/dracula.nvim", - lazy = false, - opts = {}, + "Mofiqul/dracula.nvim", + lazy = false, + opts = {}, } diff --git a/nvim/lua/plugins/treesitter.lua b/nvim/lua/plugins/treesitter.lua index 4554a7b..4d3c5fc 100644 --- a/nvim/lua/plugins/treesitter.lua +++ b/nvim/lua/plugins/treesitter.lua @@ -1,15 +1,22 @@ -return { - { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - config = function () - local configs = require("nvim-treesitter.configs") - configs.setup({ - ensure_installed = { "c", "rust", "lua", "vim", "vimdoc", "markdown" , "javascript", "typescript", "python", "html", "astro", "tsx" }, - sync_install = false, - highlight = { enable = true }, - indent = { enable = true }, - }) - end - } +return { + { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function() + local configs = require("nvim-treesitter.configs") + configs.setup({ + auto_install = false, + ensure_installed = { + "c", "rust", "lua", + "vim", "vimdoc", "markdown", + "javascript", "typescript", "python", + "html", "astro", "tsx", + "gleam", "bash" + }, + sync_install = false, + highlight = { enable = true }, + indent = { enable = true }, + }) + end + } }