diff --git a/init.lua b/init.lua index 96d054e..7632cb6 100644 --- a/init.lua +++ b/init.lua @@ -1,2 +1,23 @@ -require("core.init") -require("plugins.init") +-- Import core configuration +require("core") +require("core.neovide") + +-- Bootstrap lazy.nvim +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", + lazypath + }) +end +vim.opt.rtp:prepend(lazypath) + +-- Import plugins +require("lazy").setup("plugins") + +-- Set colorscheme +vim.cmd [[colorscheme tokyonight]] diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 0000000..8269fcb --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,30 @@ +{ + "Comment.nvim": { "branch": "master", "commit": "38d3b7eb553872d8866f14a0dd4fe84126068fce" }, + "alpha-nvim": { "branch": "main", "commit": "87c204040e3f5d4c1c95067b35905d8f8a2f2545" }, + "barbar.nvim": { "branch": "master", "commit": "488bbaa3b5455f4b776a61f2b8d10f8f798604c0" }, + "bigfile.nvim": { "branch": "main", "commit": "c1bad34ce742b4f360b67ca23c873fef998240fc" }, + "diffview.nvim": { "branch": "main", "commit": "8c1702470fd5186cb401b21f9bf8bdfad6d5cc87" }, + "filetype.nvim": { "branch": "main", "commit": "b522628a45a17d58fc0073ffd64f9dc9530a8027" }, + "git-blame.nvim": { "branch": "master", "commit": "06c20ea71a4519fc60caba9ac688f2f6404f03d5" }, + "gitsigns.nvim": { "branch": "main", "commit": "e5edefd9976039f5352e0c900f35206770b33a2d" }, + "glow.nvim": { "branch": "main", "commit": "a3f24fdaa71d2c25a2b88026032b34f5b6a6e215" }, + "guess-indent.nvim": { "branch": "main", "commit": "b8ae749fce17aa4c267eec80a6984130b94f80b2" }, + "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, + "lazy.nvim": { "branch": "main", "commit": "bb5cc9ef3bbb17541929b745f74551c900188099" }, + "lualine.nvim": { "branch": "master", "commit": "84ffb80e452d95e2c46fa29a98ea11a240f7843e" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "8d485aab32da9b8841d4af977f992b82b14af469" }, + "nui.nvim": { "branch": "main", "commit": "ecd9def93891b9260b15b5fcef542eaabf4145c9" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, + "nvim-treesitter": { "branch": "master", "commit": "1ca9b938c1c3d8b2c64a168f6a5419b8f3870410" }, + "nvim-ts-autotag": { "branch": "main", "commit": "40615e96075c743ef47aaf9de966dc348bec6459" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" }, + "nvim-web-devicons": { "branch": "master", "commit": "4ec26d67d419c12a4abaea02f1b6c57b40c08d7e" }, + "plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" }, + "smart-splits.nvim": { "branch": "master", "commit": "e1cd1ab8aac5ad36617aa887912d0d3ba7405799" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" }, + "telescope.nvim": { "branch": "master", "commit": "713d26b98583b160b50fb827adb751f768238ed3" }, + "todo-comments.nvim": { "branch": "main", "commit": "8febc60a76feefd8203077ef78b6a262ea1a41f9" }, + "toggleterm.nvim": { "branch": "main", "commit": "026dff5e2b504941cf172691561a67ea362596aa" }, + "tokyonight.nvim": { "branch": "main", "commit": "c5df636ce62a8aab7565f35da143cfd672526302" }, + "vim-matchup": { "branch": "master", "commit": "1e276be9306490e439784cf5e8abe1f93b4a41b6" } +} \ No newline at end of file diff --git a/lua/core/init.lua b/lua/core/init.lua index 2e27c67..1f83b9b 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -13,7 +13,6 @@ opt.swapfile = false opt.termguicolors = true opt.number = true opt.mouse = "a" -opt.cursorline = true opt.hidden = true -- Indentation @@ -21,6 +20,3 @@ opt.expandtab = true opt.smartindent = true opt.shiftwidth = 4 opt.tabstop = 4 - --- Neovide GUI -require("core.neovide") diff --git a/lua/plugins/barbar.lua b/lua/plugins/barbar.lua new file mode 100644 index 0000000..09ee543 --- /dev/null +++ b/lua/plugins/barbar.lua @@ -0,0 +1,11 @@ +return { + "romgrk/barbar.nvim", + dependencies = "nvim-tree/nvim-web-devicons", + init = function() vim.g.barbar_auto_setup = false end, + opts = { + auto_hide = true, + sidebar_filetypes = { + ["neo-tree"] = { event = "BufWipeout" } + } + } +} diff --git a/lua/plugins/barbar_nvimtree.lua b/lua/plugins/barbar_nvimtree.lua deleted file mode 100644 index 6c187e5..0000000 --- a/lua/plugins/barbar_nvimtree.lua +++ /dev/null @@ -1,18 +0,0 @@ -local nvim_tree_events = require("nvim-tree.events") -local bufferline_api = require("bufferline.api") - -local function get_tree_size() - return require "nvim-tree.view".View.width -end - -nvim_tree_events.subscribe("TreeOpen", function() - bufferline_api.set_offset(get_tree_size()) -end) - -nvim_tree_events.subscribe("Resize", function() - bufferline_api.set_offset(get_tree_size()) -end) - -nvim_tree_events.subscribe("TreeClose", function() - bufferline_api.set_offset(0) -end) diff --git a/lua/plugins/blankline.lua b/lua/plugins/blankline.lua new file mode 100644 index 0000000..fd6f580 --- /dev/null +++ b/lua/plugins/blankline.lua @@ -0,0 +1,43 @@ +return { + "lukas-reineke/indent-blankline.nvim", + event = "BufEnter", + opts = { + char = "▏", + context_char = "▏", + filetype_exclude = { + "help", + "terminal", + "alpha", + "lazy", + "neo-tree", + "Trouble" + }, + buftype_exclude = { "nofile", "terminal" }, + context_patterns = { + "class", + "return", + "function", + "method", + "^if", + "^while", + "jsx_element", + "^for", + "^object", + "^table", + "block", + "arguments", + "if_statement", + "else_clause", + "jsx_element", + "jsx_self_closing_element", + "try_statement", + "catch_clause", + "import_statement", + "operation_type" + }, + show_trailing_blankline_indent = false, + show_first_indent_level = false, + use_treesitter = true, + show_current_context = true + } +} diff --git a/lua/plugins/colorizer.lua b/lua/plugins/colorizer.lua new file mode 100644 index 0000000..0590702 --- /dev/null +++ b/lua/plugins/colorizer.lua @@ -0,0 +1,19 @@ +return { + "NvChad/nvim-colorizer.lua", + event = "BufEnter", + opts = { + filetypes = { + "*"; + "!markdown"; + }, + user_default_options = { + RRGGBBAA = true, + AARRGGBB = true, + rgb_fn = true, + hsl_fn = true, + css = true, + css_fn = true, + sass = { enable = true } + } + } +} diff --git a/lua/plugins/config/blankline.lua b/lua/plugins/config/blankline.lua deleted file mode 100644 index 7ef2447..0000000 --- a/lua/plugins/config/blankline.lua +++ /dev/null @@ -1,8 +0,0 @@ -require("indent_blankline").setup { - indentLine_enabled = 1, - char = "▏", - filetype_exclude = {"help", "terminal", "alpha"}, - buftype_exclude = {"terminal"}, - show_trailing_blankline_indent = false, - show_first_indent_level = false -} diff --git a/lua/plugins/config/cmp.lua b/lua/plugins/config/cmp.lua deleted file mode 100644 index d8dac32..0000000 --- a/lua/plugins/config/cmp.lua +++ /dev/null @@ -1,26 +0,0 @@ -local cmp = require("cmp") - -cmp.setup { - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end - }, - - mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.abort(), - [""] = cmp.mapping.confirm({ select = true }), - [""] = cmp.mapping.select_next_item(), - [""] = cmp.mapping.select_prev_item() - }), - - sources = cmp.config.sources({ - { name = "nvim-lsp" }, - { name = "luasnip" } - }, { - { name = "buffer" } - }) -} diff --git a/lua/plugins/config/colorizer.lua b/lua/plugins/config/colorizer.lua deleted file mode 100644 index 1aa758e..0000000 --- a/lua/plugins/config/colorizer.lua +++ /dev/null @@ -1,11 +0,0 @@ -require("colorizer").setup { - user_default_options = { - RRGGBBAA = true, - AARRGGBB = true, - rgb_fn = true, - hsl_fn = true, - css = true, - css_fn = true, - sass = { enable = true } - } -} diff --git a/lua/plugins/config/illuminate.lua b/lua/plugins/config/illuminate.lua deleted file mode 100644 index d379a83..0000000 --- a/lua/plugins/config/illuminate.lua +++ /dev/null @@ -1,3 +0,0 @@ -require("illuminate").configure { - -} diff --git a/lua/plugins/config/lualine.lua b/lua/plugins/config/lualine.lua deleted file mode 100644 index 91b2760..0000000 --- a/lua/plugins/config/lualine.lua +++ /dev/null @@ -1,14 +0,0 @@ -require("lualine").setup { - options = { - theme = "tokyonight" - }, - - extensions = { - "fzf", - "nvim-dap-ui", - "nvim-tree", - "quickfix", - "symbols-outline", - "toggleterm" - } -} diff --git a/lua/plugins/config/mason.lua b/lua/plugins/config/mason.lua deleted file mode 100644 index 235b9a6..0000000 --- a/lua/plugins/config/mason.lua +++ /dev/null @@ -1,10 +0,0 @@ -local mason = require("mason-lspconfig") -local lsp = require("lspconfig") - -mason.setup{} - -mason.setup_handlers { - function (server_name) - lsp[server_name].setup{} - end -} diff --git a/lua/plugins/config/nvimtree.lua b/lua/plugins/config/nvimtree.lua deleted file mode 100644 index 74da236..0000000 --- a/lua/plugins/config/nvimtree.lua +++ /dev/null @@ -1,28 +0,0 @@ -require("nvim-tree").setup { - view = { - hide_root_folder = true - }, - - renderer = { - group_empty = true, - highlight_git = true, - - indent_markers = { - enable = true - } - }, - - update_focused_file = { - enable = true, - update_root = true - }, - - diagnostics = { - enable = true, - show_on_dirs = true - }, - - filters = { - custom = { ".git" } - } -} diff --git a/lua/plugins/config/telescope.lua b/lua/plugins/config/telescope.lua deleted file mode 100644 index 2d6dbf9..0000000 --- a/lua/plugins/config/telescope.lua +++ /dev/null @@ -1,7 +0,0 @@ -local telescope = require("telescope") - -telescope.setup { - file_ignore_patterns = { "node_modules" } -} - -telescope.load_extension("fzf") diff --git a/lua/plugins/config/toggleterm.lua b/lua/plugins/config/toggleterm.lua deleted file mode 100644 index 9d5cb77..0000000 --- a/lua/plugins/config/toggleterm.lua +++ /dev/null @@ -1,15 +0,0 @@ -require("toggleterm").setup { - size = function(term) - if term.direction == "horizontal" then - return 25 - elseif term.direction == "vertical" then - return vim.o.columns * 0.4 - end - end, - - open_mapping = [[]], - direction = "float", - float_opts = { - border = "curved" - } -} diff --git a/lua/plugins/config/tokyonight.lua b/lua/plugins/config/tokyonight.lua deleted file mode 100644 index 1195f1b..0000000 --- a/lua/plugins/config/tokyonight.lua +++ /dev/null @@ -1,12 +0,0 @@ -require("tokyonight").setup { - style = "night", - styles = { - comments = { italic = true }, - keywords = { italic = true, bold = true }, - functions = { italic = true, bold = true }, - variables = { italic = true, bold = true } - }, - lualine_bold = true -} - -vim.cmd [[colorscheme tokyonight]] diff --git a/lua/plugins/config/treesitter.lua b/lua/plugins/config/treesitter.lua deleted file mode 100644 index 3934e25..0000000 --- a/lua/plugins/config/treesitter.lua +++ /dev/null @@ -1,9 +0,0 @@ -require("nvim-treesitter.configs").setup { - ensure_installed = { "vim", "lua", "typescript" }, - auto_install = false, - - highlight = { - enable = true, - additional_vim_regex_highlighting = false - } -} diff --git a/lua/plugins/config/whichkey.lua b/lua/plugins/config/whichkey.lua deleted file mode 100644 index 9de3c90..0000000 --- a/lua/plugins/config/whichkey.lua +++ /dev/null @@ -1,82 +0,0 @@ -local wk = require("which-key") - -wk.setup { - ignore_missing = true, - key_labels = { - [""] = "SPC" - } -} - -wk.register({ - [""] = { - f = { - name = "Find", - f = { "Telescope fd", "find file" }, - w = { "Telescope live_grep", "live grep" }, - s = { "Telescope spell_suggest", "spell suggest" }, - b = { "Telescope buffers", "all buffers" }, - t = { "TodoTelescope", "todos" }, - ["."] = { "Telescope keymaps", "keymaps" } - }, - - l = { - name = "LSP", - r = { "lua require('cosmic-ui').rename()", "rename" }, - d = { "Telescope diagnostics", "diagnostics" }, - f = { "lua vim.lsp.buf.format { async = true }", "format" }, - a = { "CodeActionMenu", "code action" } - }, - - b = { - name = "Buffer", - p = { "BufferPick", "pick buffer" }, - q = { "BufferMovePrevious", "move buffer left" }, - w = { "BufferMoveNext", "move buffer right" }, - x = { "BufferCloseAllButCurrent", "close all but current" } - }, - - g = { - name = "Git", - b = { "Gitsigns blame_line", "blame line" }, - d = { "Gitsigns diffthis", "diff" }, - s = { "Telescope git_status", "git status" }, - c = { "Telescope git_commits", "commits" } - }, - - x = { "BufferClose", "close buffer" }, - r = { "NvimTreeRefresh", "refresh tree" }, - c = { "Telescope colorscheme", "colorscheme" }, - s = { "SymbolsOutline", "symbols outline" }, - h = { "noh", "no highlight" }, - - t = { - name = "Terminal", - t = { "ToggleTerm direction=horizontal", "open terminal" } - } - }, - - t = { - name = "Trouble", - t = { "TroubleToggle", "toggle trouble" } - }, - - g = { - d = { "lua vim.lsp.buf.definition()", "definition" }, - D = { "lua vim.lsp.buf.declaration()", "declaration" }, - i = { "lua vim.lsp.buf.implementation()", "implementation" }, - t = { "lua vim.lsp.buf.type_definition()", "type definition" } - }, - - K = { "lua vim.lsp.buf.hover()", "hover" }, - [""] = { "lua vim.lsp.buf.signature_help()", "signature help" }, - - -- Nvim Tree - [""] = { "NvimTreeToggle .", "toggle nvimtree" }, - - -- Switching Buffers - [""] = { "BufferNext", "next buffer" }, - [""] = { "BufferPrevious", "previous buffer" }, - - -- Find in file - [""] = { "Telescope current_buffer_fuzzy_find", "find in file" } -}) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 69593ab..473435f 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,2 +1,55 @@ -require("plugins.setup") -require("plugins.barbar_nvimtree") +return { + "nvim-lua/plenary.nvim", + "nathom/filetype.nvim", + "LunarVim/bigfile.nvim", + "f-person/git-blame.nvim", + + { + "numToStr/Comment.nvim", + event = "BufEnter", + config = true + }, + + { + "goolord/alpha-nvim", + dependencies = "nvim-tree/nvim-web-devicons", + config = function() + require("alpha").setup(require("alpha.themes.dashboard").config) + end + }, + + { + "andymass/vim-matchup", + dependencies = "nvim-treesitter/nvim-treesitter", + event = "BufEnter" + }, + + { + "ellisonleao/glow.nvim", + cmd = "Glow", + config = true + }, + + { + "folke/todo-comments.nvim", + dependencies = "nvim-lua/plenary.nvim", + config = true + }, + + { + "nmac427/guess-indent.nvim", + config = true + }, + + { + "lewis6991/gitsigns.nvim", + config = true + }, + + { + "sindrets/diffview.nvim", + dependencies = "nvim-lua/plenary.nvim", + cmd = "DiffviewOpen", + config = true + } +} diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua new file mode 100644 index 0000000..1370fc6 --- /dev/null +++ b/lua/plugins/lualine.lua @@ -0,0 +1,19 @@ +return { + "nvim-lualine/lualine.nvim", + event = "BufEnter", + opts = { + options = { + theme = "tokyonight" + }, + + extensions = { + "fzf", + "lazy", + "neo-tree", + "nvim-dap-ui", + "symbols-outline", + "toggleterm", + "trouble" + } + } +} diff --git a/lua/plugins/neotree.lua b/lua/plugins/neotree.lua new file mode 100644 index 0000000..04cba2c --- /dev/null +++ b/lua/plugins/neotree.lua @@ -0,0 +1,33 @@ +return { + "nvim-neo-tree/neo-tree.nvim", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + "MunifTanjim/nui.nvim" + }, + cmd = "Neotree", + init = function() vim.g.neo_tree_remove_legacy_commands = true end, + opts = { + close_if_last_window = true, + + source_selector = { + winbar = true, + content_layout = "center", + sources = { + { source = "filesystem" }, + { source = "buffers" }, + { source = "git_status" }, + { source = "diagnostics" } + } + }, + + group_empty_dirs = true, + window = { width = 30 }, + + filesystem = { + follow_current_file = true, + hijack_netrw_behavior = "open_current", + use_libuv_file_watcher = true + } + } +} diff --git a/lua/plugins/setup.lua b/lua/plugins/setup.lua deleted file mode 100644 index cf666e2..0000000 --- a/lua/plugins/setup.lua +++ /dev/null @@ -1,242 +0,0 @@ --- Install packer for the first time -local ensure_packer = function() - local fn = vim.fn - local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" - if fn.empty(fn.glob(install_path)) > 0 then - fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path }) - vim.cmd [[packadd packer.nvim]] - return true - end - return false -end - -local packer_bootstrap = ensure_packer() - --- Safely load packer -local ok, packer = pcall(require, "packer") -if not ok then - return -end - --- Setup the plugins -return packer.startup(function(use) - use "wbthomason/packer.nvim" - use "nvim-lua/plenary.nvim" - use "nathom/filetype.nvim" - - use { - "folke/tokyonight.nvim", - config = function() - require("plugins.config.tokyonight") - end - } - - use "kyazdani42/nvim-web-devicons" - - use { - "kyazdani42/nvim-tree.lua", - requires = "kyazdani42/nvim-web-devicons", - config = function() - require("plugins.config.nvimtree") - end - } - - use { - "romgrk/barbar.nvim", - requires = "kyazdani42/nvim-web-devicons" - } - - use { - "nvim-treesitter/nvim-treesitter", - run = ":TSUpdate", - config = function() - require("plugins.config.treesitter") - end - } - - use { - "nvim-lualine/lualine.nvim", - requires = { "kyazdani42/nvim-web-devicons", opt = true }, - config = function() - require("plugins.config.lualine") - end - } - - use { - "NvChad/nvim-colorizer.lua", - config = function() - require("colorizer").setup() - end - } - - use { - "lewis6991/gitsigns.nvim", - config = function() - require("gitsigns").setup() - end - } - - use { - "lukas-reineke/indent-blankline.nvim", - config = function() - require("plugins.config.blankline") - end - } - - use { - "numToStr/Comment.nvim", - config = function() - require("Comment").setup() - end - } - - use { - "akinsho/toggleterm.nvim", - tag = "*", - config = function() - require("plugins.config.toggleterm") - end - } - - use { - "goolord/alpha-nvim", - requires = "kyazdani42/nvim-web-devicons", - config = function() - require("alpha").setup(require("alpha.themes.dashboard").config) - end - } - - -- Teleport - - use { - "nvim-telescope/telescope-fzf-native.nvim", - run = "make" - } - - use { - "nvim-telescope/telescope.nvim", - tag = "0.1.1", - requires = "nvim-lua/plenary.nvim", - config = function() - require("plugins.config.telescope") - end - } - - -- LSP - use { - "williamboman/mason.nvim", - requires = "neovim/nvim-lspconfig", - config = function() - require("mason").setup() - end - } - - use { - "williamboman/mason-lspconfig.nvim", - requires = { - "neovim/nvim-lspconfig", - "williamboman/mason.nvim" - }, - config = function() - require("plugins.config.mason") - end - } - - use { - "hrsh7th/nvim-cmp", - requires = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "hrsh7th/cmp-cmdline", - "L3MON4D3/LuaSnip", - "saadparwaiz1/cmp_luasnip" - }, - config = function() - require("plugins.config.cmp") - end - } - - use { - "rafamadriz/friendly-snippets", - requires = "L3MON4D3/LuaSnip" - } - - use { - "ray-x/lsp_signature.nvim", - after = "nvim-lspconfig", - config = function() - require("lsp_signature").setup() - end - } - - use { - "windwp/nvim-autopairs", - config = function() - require("nvim-autopairs").setup() - end - } - - use { - "folke/trouble.nvim", - requires = "kyazdani42/nvim-web-devicons", - config = function() - require("trouble").setup() - end - } - - use { - "folke/todo-comments.nvim", - requires = "nvim-lua/plenary.nvim", - config = function() - require("todo-comments").setup() - end - } - - use { - "simrat39/symbols-outline.nvim", - config = function() - require("symbols-outline").setup() - end - } - - use { - "folke/which-key.nvim", - config = function() - require("plugins.config.whichkey") - end - } - - use { - "RRethy/vim-illuminate", - requires = "neovim/nvim-lspconfig" - } - - use { - "weilbith/nvim-code-action-menu", - requires = "neovim/nvim-lspconfig", - cmd = "CodeActionMenu" - } - - use { - "ellisonleao/glow.nvim", - config = function() - require("glow").setup() - end - } - - use { - "CosmicNvim/cosmic-ui", - requires = { - "MunifTanjim/nui.nvim", - "nvim-lua/plenary.nvim" - }, - config = function() - require("cosmic-ui").setup() - end - } - - if packer_bootstrap then - require("packer").sync() - end -end) diff --git a/lua/plugins/smartsplits.lua b/lua/plugins/smartsplits.lua new file mode 100644 index 0000000..da49fe1 --- /dev/null +++ b/lua/plugins/smartsplits.lua @@ -0,0 +1,7 @@ +return { + "mrjones2014/smart-splits.nvim", + build = "./kitty/install-kittens.bash", + opt = { + ignored_buftypes = { "NeoTree" } + } +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua new file mode 100644 index 0000000..053055b --- /dev/null +++ b/lua/plugins/telescope.lua @@ -0,0 +1,20 @@ +return { + "nvim-telescope/telescope.nvim", + dependencies = { + "nvim-telescope/telescope-fzf-native.nvim", + enabled = vim.fn.executable "make" == 1, + build = "make" + }, + cmd = "Telescope", + opts = { + defaults = { + layout_strategy = "vertical" + }, + + file_ignore_patterns = { "node_modules" } + }, + config = function() + local telescope = require("telescope") + telescope.load_extension("fzf") + end +} diff --git a/lua/plugins/toggleterm.lua b/lua/plugins/toggleterm.lua new file mode 100644 index 0000000..ee3eb98 --- /dev/null +++ b/lua/plugins/toggleterm.lua @@ -0,0 +1,20 @@ +return { + "akinsho/toggleterm.nvim", + version = "*", + keys = { "" }, + opts = { + size = function(term) + if term.direction == "horizontal" then + return 25 + elseif term.direction == "vertical" then + return vim.o.columns * 0.4 + end + end, + + open_mapping = [[]], + direction = "float", + float_opts = { + border = "curved" + } + } +} diff --git a/lua/plugins/tokyonight.lua b/lua/plugins/tokyonight.lua new file mode 100644 index 0000000..c82127f --- /dev/null +++ b/lua/plugins/tokyonight.lua @@ -0,0 +1,13 @@ +return { + "folke/tokyonight.nvim", + opts = { + style = "night", + styles = { + comments = { italic = true }, + keywords = { italic = true, bold = true }, + functions = { italic = true, bold = true }, + variables = { bold = true } + }, + lualine_bold = true + } +} diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua new file mode 100644 index 0000000..e7f752d --- /dev/null +++ b/lua/plugins/treesitter.lua @@ -0,0 +1,15 @@ +return { + "nvim-treesitter/nvim-treesitter", + dependencies = { "windwp/nvim-ts-autotag", "JoosepAlviste/nvim-ts-context-commentstring" }, + build = ":TSUpdate", + config = function() + require("nvim-treesitter.configs").setup { + highlight = { enable = true }, + incremental_selection = { enable = true }, + indent = { enable = true }, + autotag = { enable = true }, + context_commentstring = { enable = true, enable_autocmd = false }, + matchup = { enable = true } + } + end +}