diff --git a/lazy-lock.json b/lazy-lock.json index 8672f38..5865fab 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,29 +1,31 @@ { "LuaSnip": { "branch": "master", "commit": "a7a4b4682c4b3e2ba82b82a4e6e5f5a0e79dec32" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, + "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "fidget.nvim": { "branch": "main", "commit": "910104a2d0a831ba8ac662cd23d3f1c685401cf6" }, - "lazy.nvim": { "branch": "main", "commit": "af6afefbb46ab29a8a1db69536b04290a9403876" }, - "lualine.nvim": { "branch": "master", "commit": "af4c3cf17206810880d2a93562e0a4c0d901c684" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "82c7cb08ddb836ad938b2708e50085f12a8825d2" }, - "mason.nvim": { "branch": "main", "commit": "3b5068f0fc565f337d67a2d315d935f574848ee7" }, + "fidget.nvim": { "branch": "main", "commit": "933db4596e4bab1b09b6d48a10e21819e4cc458f" }, + "lazy.nvim": { "branch": "main", "commit": "08954f723bf2d442ea020551e3acc956f4dc6dc7" }, + "lualine.nvim": { "branch": "master", "commit": "b5e8bb642138f787a2c1c5aedc2a78cb2cebbd67" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "9dfcf2036c223920826140f0151d929a43f9eceb" }, + "mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, "mini.comment": { "branch": "main", "commit": "a4b7e46deb9ad2feb8902cc5dbf087eced112ee5" }, "mini.indentscope": { "branch": "main", "commit": "cf07f19e718ebb0bcc5b00999083ce11c37b8d40" }, "mini.move": { "branch": "main", "commit": "251d541a8ab745e81295a53c128829cb2bff18e3" }, "mini.pairs": { "branch": "main", "commit": "04f58f2545ed80ac3b52dd4826e93f33e15b2af6" }, "mini.surround": { "branch": "main", "commit": "a1b590cc3b676512de507328d6bbab5e43794720" }, - "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, - "nvim-lspconfig": { "branch": "master", "commit": "1f3ef31d1bb967050c81420ca921a1a2ade10e77" }, - "nvim-tree.lua": { "branch": "master", "commit": "f7c09bd72e50e1795bd3afb9e2a2b157b4bfb3c3" }, - "nvim-treesitter": { "branch": "master", "commit": "6a2572c9ed0342ae9e1012b9c8a774a1ea009e71" }, + "nvim-cmp": { "branch": "main", "commit": "97dc716fc914c46577a4f254035ebef1aa72558a" }, + "nvim-lspconfig": { "branch": "master", "commit": "6e5c78ebc9936ca74add66bda22c566f951b6ee5" }, + "nvim-tree.lua": { "branch": "master", "commit": "85c502e9076d9c82e2f04addabb3614846ae7558" }, + "nvim-treesitter": { "branch": "master", "commit": "5e4f959d5979730ddb2ee9ae60f5133081502b23" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "d2a4ffc22d9d38d44edb73da007b3cf43451e9b4" }, - "nvim-web-devicons": { "branch": "master", "commit": "cb0c967c9723a76ccb1be0cc3a9a10e577d2f6ec" }, + "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, + "nvim-web-devicons": { "branch": "master", "commit": "6662f059bf78e6092ba90cd1929599625f448f55" }, "plenary": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" }, - "rose-pine": { "branch": "main", "commit": "c52167563e6aa44b5fa6fe007faa2bcac71050f0" }, - "telescope-file-browser.nvim": { "branch": "master", "commit": "8839e3f8070dfafa5b0c0e4652700298e7b872c4" }, - "telescope.nvim": { "branch": "master", "commit": "8cd58c6e81ac4c919ae3ea70cdf1a17c265a508f" }, + "rose-pine": { "branch": "main", "commit": "f48fcd5ccc5f70d8e221e7e2e87ee2003c5eda37" }, + "telescope-file-browser.nvim": { "branch": "master", "commit": "5ee5002373655fd684a4ad0d47a3de876ceacf9a" }, + "telescope.nvim": { "branch": "master", "commit": "c2b8311dfacd08b3056b8f0249025d633a4e71a8" }, + "vim-prettier": { "branch": "master", "commit": "7dbdbb12c50a9f4ba72390cce2846248e4368fd0" }, "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } } \ No newline at end of file diff --git a/lua/stevenmm/lazy/prettier.lua b/lua/stevenmm/lazy/prettier.lua new file mode 100644 index 0000000..41e2fa2 --- /dev/null +++ b/lua/stevenmm/lazy/prettier.lua @@ -0,0 +1,7 @@ +return { + "prettier/vim-prettier", + + -- config = function() + -- require("vim-prettier").setup() + -- end, +} \ No newline at end of file diff --git a/lua/stevenmm/lazy/treesitter.lua b/lua/stevenmm/lazy/treesitter.lua index 7b2bab3..df6bbb7 100644 --- a/lua/stevenmm/lazy/treesitter.lua +++ b/lua/stevenmm/lazy/treesitter.lua @@ -3,10 +3,119 @@ return { "nvim-treesitter/nvim-treesitter", - - dependencies = { - "nvim-treesitter/nvim-treesitter-textobjects", - }, - + version = false, build = ":TSUpdate", + -- init = function(plugin) + -- require("lazy.core.loader").add_to_rtp(plugin) + -- require("nvim-treesitter.query_predicates") + -- end, + dependencies = { + { + "nvim-treesitter/nvim-treesitter-textobjects", + "windwp/nvim-ts-autotag", + -- config = function() + -- local move = require("nvim-treesitter.textobjects.move") + -- local configs = require("nvim-treesitter.configs") + -- for name, fn in pairs(move) do + -- if name:find("goto") == 1 then + -- move[name] = function(q, ...) + -- if vim.wo.diff then + -- local config = configs.get_module("textobjects.move")[name] + -- for key, query in pairs(config or {}) do + -- if q == query and key:find("[%]%[][cC]") then + -- vim.cmd("normal! " .. key) + -- return + -- end + -- end + -- end + -- return fn(q, ...) + -- end + -- end + -- end + -- end, + -- }, + }, + }, + -- cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" }, + -- keys = { + -- { "", desc = "Increment Selection" }, + -- { "", desc = "Decrement Selection", mode = "x" }, + -- }, + opts = { + highlight = { enable = true }, + indent = { enable = true }, + -- autotag = { + -- enable = true, + -- -- enable_rename = true, + -- -- enable_close = true, + -- -- enable_close_on_slash = true, + -- -- filetypes = { "html", "xml" }, + -- }, + ensure_installed = { + "bash", + "c", + "c_sharp", + "cpp", + "diff", + "html", + "javascript", + "jsdoc", + "json", + "jsonc", + "lua", + "luadoc", + "luap", + "markdown", + "markdown_inline", + "python", + "query", + "regex", + "rust", + "toml", + "tsx", + "typescript", + "vim", + "vimdoc", + "vue", + "xml", + "yaml", + }, + -- incremental_selection = { + -- enable = true, + -- keymaps = { + -- init_selection = "", + -- node_incremental = "", + -- scope_incremental = false, + -- node_decremental = "", + -- }, + -- }, + -- textobjects = { + -- move = { + -- enable = true, + -- goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer" }, + -- goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer" }, + -- goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer" }, + -- goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer" }, + -- }, + -- }, + }, + config = function(_, opts) + require('nvim-ts-autotag').setup() + if type(opts.ensure_installed) == "table" then + local added = {} + opts.ensure_installed = vim.tbl_filter(function(lang) + if added[lang] then + return false + end + added[lang] = true + return true + end, opts.ensure_installed) + end + require("nvim-treesitter.configs").setup(opts) + end, + -- require('nvim-treesitter.configs').setup { + -- autotag = { + -- enable = true, + -- } + -- } } diff --git a/lua/stevenmm/set.lua b/lua/stevenmm/set.lua index 11bfa9f..1a96925 100644 --- a/lua/stevenmm/set.lua +++ b/lua/stevenmm/set.lua @@ -6,20 +6,20 @@ vim.opt.relativenumber = true vim.opt.encoding = 'UTF-8' vim.opt.guifont = 'NotoSansM Nerd Font Mono' -vim.opt.tabstop = 4 -vim.opt.softtabstop = 4 -vim.shiftwidth = 4 -vim.opt.smarttab = true -vim.opt.expandtab = true +vim.opt.tabstop = 2 +vim.opt.shiftwidth = 2 +vim.opt.softtabstop = -1 +vim.opt.smarttab = false +vim.opt.expandtab = false -vim.opt.smartindent = true +vim.opt.smartindent = false vim.opt.wrap = false vim.opt.swapfile = false vim.opt.backup = false -if vim.fn.has('win32') or vim.fn.has('win64') then +if vim.fn.has('win32') or vim.fn.has('win64') then vim.opt.undodir = os.getenv("XDG_CONFIG_HOME") .. "/.vim/undodir" else vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"