modified some files (set.lua, treesitter.lua), added prettier.lua (might change it later)
This commit is contained in:
7
lua/stevenmm/lazy/prettier.lua
Normal file
7
lua/stevenmm/lazy/prettier.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"prettier/vim-prettier",
|
||||
|
||||
-- config = function()
|
||||
-- require("vim-prettier").setup()
|
||||
-- end,
|
||||
}
|
||||
@@ -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 = {
|
||||
-- { "<c-space>", desc = "Increment Selection" },
|
||||
-- { "<bs>", 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 = "<C-space>",
|
||||
-- node_incremental = "<C-space>",
|
||||
-- scope_incremental = false,
|
||||
-- node_decremental = "<bs>",
|
||||
-- },
|
||||
-- },
|
||||
-- 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,
|
||||
-- }
|
||||
-- }
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user