Updates to theme & stuff
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
 | 
			
		||||
  "avante.nvim": { "branch": "main", "commit": "e2b34f6435edcb9ef0a051ddcf24693a5d8bba2b" },
 | 
			
		||||
  "avante.nvim": { "branch": "main", "commit": "c10e383019280edf6433b422603be45294c9ccf5" },
 | 
			
		||||
  "barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" },
 | 
			
		||||
  "cloak.nvim": { "branch": "main", "commit": "648aca6d33ec011dc3166e7af3b38820d01a71e4" },
 | 
			
		||||
  "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
 | 
			
		||||
@@ -18,34 +18,35 @@
 | 
			
		||||
  "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
 | 
			
		||||
  "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
 | 
			
		||||
  "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
 | 
			
		||||
  "fzf-lua": { "branch": "main", "commit": "1977a7648a264fabf453ee082e2398e38cc3b588" },
 | 
			
		||||
  "gitsigns.nvim": { "branch": "main", "commit": "d0f90ef51d4be86b824b012ec52ed715b5622e51" },
 | 
			
		||||
  "fzf-lua": { "branch": "main", "commit": "3d4342120cf12f36b60a8161a8835b111ec5ec9a" },
 | 
			
		||||
  "gitsigns.nvim": { "branch": "main", "commit": "1b0350ab707713b2bc6c236151f1a324175347b1" },
 | 
			
		||||
  "image.nvim": { "branch": "master", "commit": "4c51d6202628b3b51e368152c053c3fb5c5f76f2" },
 | 
			
		||||
  "img-clip.nvim": { "branch": "main", "commit": "d8b6b030672f9f551a0e3526347699985a779d93" },
 | 
			
		||||
  "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
 | 
			
		||||
  "leetcode.nvim": { "branch": "master", "commit": "db7e1cd6b9191b34b4c1f2f96e4e3949cde9f951" },
 | 
			
		||||
  "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
 | 
			
		||||
  "lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
 | 
			
		||||
  "mason-lspconfig.nvim": { "branch": "main", "commit": "bef29b653ba71d442816bf56286c2a686210be04" },
 | 
			
		||||
  "mason-lspconfig.nvim": { "branch": "main", "commit": "c4c84f4521d62de595c0d0f718a9a40c1890c8ce" },
 | 
			
		||||
  "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
 | 
			
		||||
  "mcphub.nvim": { "branch": "main", "commit": "7752efc63da929683c5d4812e7d0d066189ee68f" },
 | 
			
		||||
  "mcphub.nvim": { "branch": "main", "commit": "1eb7bec18f3927ee7fa468e0a176812383669596" },
 | 
			
		||||
  "mini.hipatterns": { "branch": "main", "commit": "d71c21167d6bd5f21c9ecf90912c510f9edfc02b" },
 | 
			
		||||
  "neo-tree.nvim": { "branch": "v3.x", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" },
 | 
			
		||||
  "nerdcommenter": { "branch": "master", "commit": "02a3b6455fa07b61b9440a78732f1e9b7876c991" },
 | 
			
		||||
  "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
 | 
			
		||||
  "nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" },
 | 
			
		||||
  "nvim-autopairs": { "branch": "master", "commit": "2647cce4cb64fb35c212146663384e05ae126bdf" },
 | 
			
		||||
  "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
 | 
			
		||||
  "nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" },
 | 
			
		||||
  "nvim-lspconfig": { "branch": "master", "commit": "a182334ba933e58240c2c45e6ae2d9c7ae313e00" },
 | 
			
		||||
  "nvim-notify": { "branch": "master", "commit": "b5825cf9ee881dd8e43309c93374ed5b87b7a896" },
 | 
			
		||||
  "nvim-lspconfig": { "branch": "master", "commit": "6bba673aa8993eceec233be17b42ddfb9540794b" },
 | 
			
		||||
  "nvim-notify": { "branch": "master", "commit": "a22f5d7ac511c2df2fd3290a9f04c48d5a822e2e" },
 | 
			
		||||
  "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
 | 
			
		||||
  "nvim-treesitter-context": { "branch": "master", "commit": "464a443b5a6657f39772b20baa95d02ffe97b268" },
 | 
			
		||||
  "nvim-treesitter-context": { "branch": "master", "commit": "1a1a7c5d6d75cb49bf64049dafab15ebe294a79f" },
 | 
			
		||||
  "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
 | 
			
		||||
  "nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
 | 
			
		||||
  "nvim-web-devicons": { "branch": "master", "commit": "19d6211c78169e78bab372b585b6fb17ad974e82" },
 | 
			
		||||
  "nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" },
 | 
			
		||||
  "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
 | 
			
		||||
  "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
 | 
			
		||||
  "render-markdown.nvim": { "branch": "main", "commit": "6f5a4c36d9383b2a916facaa63dcd573afa11ee8" },
 | 
			
		||||
  "rest.nvim": { "branch": "main", "commit": "2ded89dbda1fd3c1430685ffadf2df8beb28336d" },
 | 
			
		||||
  "render-markdown.nvim": { "branch": "main", "commit": "24aacee83544ca113055564ed22be7852067c342" },
 | 
			
		||||
  "rest.nvim": { "branch": "main", "commit": "de9726ab956e30202aafbcdea83c1d6bffe54227" },
 | 
			
		||||
  "supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
 | 
			
		||||
  "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
 | 
			
		||||
  "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
 | 
			
		||||
 
 | 
			
		||||
@@ -63,7 +63,3 @@ autocmd('LspAttach', {
 | 
			
		||||
        vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
 | 
			
		||||
    end
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
--vim.g.netrw_browse_split = 0
 | 
			
		||||
--vim.g.netrw_banner = 0
 | 
			
		||||
--vim.g.netrw_winsize = 25
 | 
			
		||||
 
 | 
			
		||||
@@ -23,5 +23,5 @@ require("lazy").setup({
 | 
			
		||||
	},
 | 
			
		||||
  install = { colorscheme = { "tokyonight-moon" } },
 | 
			
		||||
  -- automatically check for plugin updates
 | 
			
		||||
  checker = { enabled = true },
 | 
			
		||||
  --checker = { enabled = true },
 | 
			
		||||
})
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@ vim.opt.relativenumber = true
 | 
			
		||||
vim.opt.tabstop = 2
 | 
			
		||||
vim.opt.softtabstop = 2
 | 
			
		||||
vim.opt.shiftwidth = 2
 | 
			
		||||
--vim.opt.expandtab = true
 | 
			
		||||
vim.opt.expandtab = true
 | 
			
		||||
 | 
			
		||||
vim.opt.smartindent = true
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -116,7 +116,7 @@ return {
 | 
			
		||||
				---@type "right" | "left" | "top" | "bottom"
 | 
			
		||||
				position = "right", -- the position of the sidebar
 | 
			
		||||
				wrap = true, -- similar to vim.o.wrap
 | 
			
		||||
				width = 30, -- default % based on available width
 | 
			
		||||
				width = 35, -- default % based on available width
 | 
			
		||||
				sidebar_header = {
 | 
			
		||||
					enabled = true, -- true, false to enable/disable the header
 | 
			
		||||
					align = "center", -- left, center, right for title
 | 
			
		||||
 
 | 
			
		||||
@@ -17,11 +17,25 @@ return {
 | 
			
		||||
				},
 | 
			
		||||
				ignore_focus = {},
 | 
			
		||||
				always_divide_middle = true,
 | 
			
		||||
				always_show_tabline = true,
 | 
			
		||||
				globalstatus = false,
 | 
			
		||||
				refresh = {
 | 
			
		||||
					statusline = 1000,
 | 
			
		||||
					tabline = 1000,
 | 
			
		||||
					winbar = 1000,
 | 
			
		||||
					refresh_time = 16, -- ~60fps
 | 
			
		||||
					events = {
 | 
			
		||||
						'WinEnter',
 | 
			
		||||
						'BufEnter',
 | 
			
		||||
						'BufWritePost',
 | 
			
		||||
						'SessionLoadPost',
 | 
			
		||||
						'FileChangedShellPost',
 | 
			
		||||
						'VimResized',
 | 
			
		||||
						'Filetype',
 | 
			
		||||
						'CursorMoved',
 | 
			
		||||
						'CursorMovedI',
 | 
			
		||||
						'ModeChanged',
 | 
			
		||||
					},
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
			sections = {
 | 
			
		||||
 
 | 
			
		||||
@@ -55,7 +55,7 @@ return {
 | 
			
		||||
			{ '<leader>h', '<C-w>h', mode = { 'n', 'v' }, desc = 'Left' },
 | 
			
		||||
			{ '<leader>j', '<C-w>j', mode = { 'n', 'v' }, desc = 'Down' },
 | 
			
		||||
			{ '<leader>k', '<C-w>k', mode = { 'n', 'v' }, desc = 'Up' },
 | 
			
		||||
			{ '<leader>l', '<C-w>l', mode = { 'n', 'v' }, desc = 'Right' },	
 | 
			
		||||
			{ '<leader>l', '<C-w>l', mode = { 'n', 'v' }, desc = 'Right' },
 | 
			
		||||
		},
 | 
			
		||||
    lazy = false,
 | 
			
		||||
    -----Instead of using `config`, you can use `opts` instead, if you'd like:
 | 
			
		||||
@@ -83,15 +83,15 @@ return {
 | 
			
		||||
			enable_diagnostics = true,
 | 
			
		||||
			open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes
 | 
			
		||||
			open_files_using_relative_paths = false,
 | 
			
		||||
			sort_case_insensitive = false, -- used when sorting files and directories in the tree
 | 
			
		||||
			--sort_function = nil, -- use a custom function for sorting files and directories in the tree
 | 
			
		||||
			 sort_function = function (a,b)
 | 
			
		||||
						 if a.type == b.type then
 | 
			
		||||
								 return a.path > b.path
 | 
			
		||||
						 else
 | 
			
		||||
								 return a.type > b.type
 | 
			
		||||
						 end
 | 
			
		||||
				 end , -- this sorts files and directories descendantly
 | 
			
		||||
			sort_case_insensitive = true, -- used when sorting files and directories in the tree
 | 
			
		||||
			sort_function = nil, -- use a custom function for sorting files and directories in the tree
 | 
			
		||||
			--sort_function = function (a,b)
 | 
			
		||||
				--if a.type == b.type then
 | 
			
		||||
					--return a.path > b.path
 | 
			
		||||
				--else
 | 
			
		||||
					--return a.type > b.type
 | 
			
		||||
				--end
 | 
			
		||||
			--end, -- this sorts files and directories descendantly
 | 
			
		||||
			default_component_configs = {
 | 
			
		||||
				container = {
 | 
			
		||||
					enable_character_fade = true,
 | 
			
		||||
@@ -185,7 +185,7 @@ return {
 | 
			
		||||
			commands = {},
 | 
			
		||||
			window = {
 | 
			
		||||
				position = "left",
 | 
			
		||||
				width = 35,
 | 
			
		||||
				width = 30,
 | 
			
		||||
				mapping_options = {
 | 
			
		||||
					noremap = true,
 | 
			
		||||
					nowait = true,
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										80
									
								
								configs/dotfiles/nvim/lua/plugins/tokyonight.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										80
									
								
								configs/dotfiles/nvim/lua/plugins/tokyonight.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							@@ -1,29 +1,55 @@
 | 
			
		||||
return {
 | 
			
		||||
	{
 | 
			
		||||
		'folke/tokyonight.nvim',
 | 
			
		||||
		lazy = false,
 | 
			
		||||
		priority = 1000,
 | 
			
		||||
		opts = {
 | 
			
		||||
			style = 'moon',
 | 
			
		||||
			light_style = 'day',
 | 
			
		||||
			transparent = true,
 | 
			
		||||
			terminal_colors = true, -- Configure the colors used when opening a `:terminal` in [Neovim](https://github.com/neovim/neovim)
 | 
			
		||||
			styles = {
 | 
			
		||||
				-- Style to be applied to different syntax groups
 | 
			
		||||
				-- Value is any valid attr-list value for `:help nvim_set_hl`
 | 
			
		||||
				comments = { italic = true },
 | 
			
		||||
				keywords = { italic = true },
 | 
			
		||||
				functions = {},
 | 
			
		||||
				variables = {},
 | 
			
		||||
				-- Background styles. Can be "dark", "transparent" or "normal"
 | 
			
		||||
				sidebars = "dark", -- style for sidebars, see below
 | 
			
		||||
				floats = "dark", -- style for floating windows
 | 
			
		||||
			},
 | 
			
		||||
			sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]`
 | 
			
		||||
			day_brightness = 0.3, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors
 | 
			
		||||
			hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**.
 | 
			
		||||
			dim_inactive = false, -- dims inactive windows
 | 
			
		||||
			lualine_bold = false, -- When `true`, section headers in the lualine theme will be bold
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
  {
 | 
			
		||||
    "folke/tokyonight.nvim",
 | 
			
		||||
    lazy = false,
 | 
			
		||||
    priority = 1000,
 | 
			
		||||
    opts = {
 | 
			
		||||
    style = "moon", -- The theme comes in three styles, `storm`, a darker variant `night` and `day`
 | 
			
		||||
      light_style = "night", -- The theme is used when the background is set to light
 | 
			
		||||
      transparent = true, -- Enable this to disable setting the background color
 | 
			
		||||
      terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
 | 
			
		||||
      styles = {
 | 
			
		||||
        comments = { italic = true },
 | 
			
		||||
        keywords = { italic = true },
 | 
			
		||||
        functions = {},
 | 
			
		||||
        variables = {},
 | 
			
		||||
        -- Background styles. Can be "dark", "transparent" or "normal"
 | 
			
		||||
        sidebars = "dark", -- style for sidebars, see below
 | 
			
		||||
        floats = "dark", -- style for floating windows
 | 
			
		||||
      },
 | 
			
		||||
      day_brightness = 0.3, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors
 | 
			
		||||
      dim_inactive = false, -- dims inactive windows
 | 
			
		||||
      lualine_bold = true, -- When `true`, section headers in the lualine theme will be bold
 | 
			
		||||
 | 
			
		||||
      --- You can override specific color groups to use other groups or a hex color
 | 
			
		||||
      --- function will be called with a ColorScheme table
 | 
			
		||||
      ---@param colors ColorScheme
 | 
			
		||||
      on_colors = function(colors)
 | 
			
		||||
        colors.comment = "#a0a7c5"
 | 
			
		||||
        colors.terminal_black = "#828bb8"
 | 
			
		||||
      end,
 | 
			
		||||
 | 
			
		||||
      --- You can override specific highlights to use other groups or a hex color
 | 
			
		||||
      --- function will be called with a Highlights and ColorScheme table
 | 
			
		||||
      ---@param highlights tokyonight.Highlights
 | 
			
		||||
      ---@param colors ColorScheme
 | 
			
		||||
      on_highlights = function(highlights, colors) end,
 | 
			
		||||
 | 
			
		||||
      cache = true, -- When set to true, the theme will be cached for better performance
 | 
			
		||||
 | 
			
		||||
      ---@type table<string, boolean|{enabled:boolean}>
 | 
			
		||||
      plugins = {
 | 
			
		||||
        -- enable all plugins when not using lazy.nvim
 | 
			
		||||
        -- set to false to manually enable/disable plugins
 | 
			
		||||
        all = package.loaded.lazy == nil,
 | 
			
		||||
        -- uses your plugin manager to automatically enable needed plugins
 | 
			
		||||
        -- currently only lazy.nvim is supported
 | 
			
		||||
        auto = true,
 | 
			
		||||
        -- add any plugins here that you want to enable
 | 
			
		||||
        -- for all possible plugins, see:
 | 
			
		||||
        --   * https://github.com/folke/tokyonight.nvim/tree/main/lua/tokyonight/groups
 | 
			
		||||
        telescope = true,
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -4,77 +4,106 @@ return {
 | 
			
		||||
		branch = 'master',
 | 
			
		||||
		lazy = false,
 | 
			
		||||
		build = ':TSUpdate',
 | 
			
		||||
		opts = {
 | 
			
		||||
			ensure_installed = {
 | 
			
		||||
				'bash',
 | 
			
		||||
				'c',
 | 
			
		||||
				'cmake',
 | 
			
		||||
				'cpp',
 | 
			
		||||
				'css',
 | 
			
		||||
				'diff',
 | 
			
		||||
				'dockerfile',
 | 
			
		||||
				'git_config',
 | 
			
		||||
				'git_rebase',
 | 
			
		||||
				'gitattributes',
 | 
			
		||||
				'gitcommit',
 | 
			
		||||
				'gitignore',
 | 
			
		||||
				'html',
 | 
			
		||||
				'java',
 | 
			
		||||
				'javascript',
 | 
			
		||||
				'jsdoc',
 | 
			
		||||
				'json',
 | 
			
		||||
				'jsonc',
 | 
			
		||||
				'kotlin',
 | 
			
		||||
				'lua',
 | 
			
		||||
				'luadoc',
 | 
			
		||||
				'luap',
 | 
			
		||||
				'make',
 | 
			
		||||
				'markdown',
 | 
			
		||||
				'markdown_inline',
 | 
			
		||||
				'php',
 | 
			
		||||
				'printf',
 | 
			
		||||
				'python',
 | 
			
		||||
				'query',
 | 
			
		||||
				'regex',
 | 
			
		||||
				'rust',
 | 
			
		||||
				'scala',
 | 
			
		||||
				'sql',
 | 
			
		||||
				'svelte',
 | 
			
		||||
				'swift',
 | 
			
		||||
				'toml',
 | 
			
		||||
				'tsx',
 | 
			
		||||
				'typescript',
 | 
			
		||||
				'vim',
 | 
			
		||||
				'vimdoc',
 | 
			
		||||
				'xml',
 | 
			
		||||
				'yaml',
 | 
			
		||||
				'zig'
 | 
			
		||||
			},
 | 
			
		||||
			sync_install = false,
 | 
			
		||||
			auto_install = true,
 | 
			
		||||
			indent = { enable = true },
 | 
			
		||||
			highlight = {
 | 
			
		||||
				enable = true,
 | 
			
		||||
				disable = function(lang, buf)
 | 
			
		||||
						local max_filesize = 100 * 1024 -- 100 KB
 | 
			
		||||
						local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
 | 
			
		||||
						if ok and stats and stats.size > max_filesize then
 | 
			
		||||
								return true
 | 
			
		||||
						end
 | 
			
		||||
				end,
 | 
			
		||||
				-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
 | 
			
		||||
				-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
 | 
			
		||||
				-- Using this option may slow down your editor, and you may see some duplicate highlights.
 | 
			
		||||
				-- Instead of true it can also be a list of languages
 | 
			
		||||
				additional_vim_regex_highlighting = false,
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
		config = function()
 | 
			
		||||
			require'nvim-treesitter.configs'.setup ({
 | 
			
		||||
				ensure_installed = {
 | 
			
		||||
					'bash',
 | 
			
		||||
					'c',
 | 
			
		||||
					'cmake',
 | 
			
		||||
					'cpp',
 | 
			
		||||
					'css',
 | 
			
		||||
					'diff',
 | 
			
		||||
					'dockerfile',
 | 
			
		||||
					'git_config',
 | 
			
		||||
					'git_rebase',
 | 
			
		||||
					'gitattributes',
 | 
			
		||||
					'gitcommit',
 | 
			
		||||
					'gitignore',
 | 
			
		||||
					'html',
 | 
			
		||||
					'java',
 | 
			
		||||
					'javascript',
 | 
			
		||||
					'jsdoc',
 | 
			
		||||
					'json',
 | 
			
		||||
					'jsonc',
 | 
			
		||||
					'kotlin',
 | 
			
		||||
					'lua',
 | 
			
		||||
					'luadoc',
 | 
			
		||||
					'luap',
 | 
			
		||||
					'make',
 | 
			
		||||
					'markdown',
 | 
			
		||||
					'markdown_inline',
 | 
			
		||||
					'php',
 | 
			
		||||
					'printf',
 | 
			
		||||
					'python',
 | 
			
		||||
					'query',
 | 
			
		||||
					'regex',
 | 
			
		||||
					'rust',
 | 
			
		||||
					'scala',
 | 
			
		||||
					'sql',
 | 
			
		||||
					'svelte',
 | 
			
		||||
					'swift',
 | 
			
		||||
					'toml',
 | 
			
		||||
					'tsx',
 | 
			
		||||
					'typescript',
 | 
			
		||||
					'vim',
 | 
			
		||||
					'vimdoc',
 | 
			
		||||
					'xml',
 | 
			
		||||
					'yaml',
 | 
			
		||||
					'zig'
 | 
			
		||||
				},
 | 
			
		||||
				sync_install = false,
 | 
			
		||||
				auto_install = true,
 | 
			
		||||
				indent = { enable = true },
 | 
			
		||||
				highlight = {
 | 
			
		||||
					enable = true,
 | 
			
		||||
					disable = function(lang, buf)
 | 
			
		||||
							local max_filesize = 500 * 1024 -- 100 KB
 | 
			
		||||
							local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
 | 
			
		||||
							if ok and stats and stats.size > max_filesize then
 | 
			
		||||
									return true
 | 
			
		||||
							end
 | 
			
		||||
					end,
 | 
			
		||||
					-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
 | 
			
		||||
					-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
 | 
			
		||||
					-- Using this option may slow down your editor, and you may see some duplicate highlights.
 | 
			
		||||
					-- Instead of true it can also be a list of languages
 | 
			
		||||
					additional_vim_regex_highlighting = false,
 | 
			
		||||
				},
 | 
			
		||||
			})
 | 
			
		||||
			local treesitter_parser_config = require("nvim-treesitter.parsers").get_parser_configs()
 | 
			
		||||
			treesitter_parser_config.templ = {
 | 
			
		||||
				install_info = {
 | 
			
		||||
					url = "https://github.com/vrischmann/tree-sitter-templ.git",
 | 
			
		||||
					files = {"src/parser.c", "src/scanner.c"},
 | 
			
		||||
					branch = "master",
 | 
			
		||||
				},
 | 
			
		||||
			}
 | 
			
		||||
			vim.treesitter.language.register("templ", "templ")
 | 
			
		||||
	end
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		'nvim-treesitter/playground',
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
		'nvim-treesitter/nvim-treesitter-context'
 | 
			
		||||
		"nvim-treesitter/nvim-treesitter-context",
 | 
			
		||||
		after = "nvim-treesitter",
 | 
			
		||||
		config = function()
 | 
			
		||||
			require'treesitter-context'.setup{
 | 
			
		||||
				enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
 | 
			
		||||
				multiwindow = false, -- Enable multiwindow support.
 | 
			
		||||
				max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
 | 
			
		||||
				min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
 | 
			
		||||
				line_numbers = true,
 | 
			
		||||
				multiline_threshold = 20, -- Maximum number of lines to show for a single context
 | 
			
		||||
				trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
 | 
			
		||||
				mode = 'cursor',  -- Line used to calculate context. Choices: 'cursor', 'topline'
 | 
			
		||||
				-- Separator between context and content. Should be a single character string, like '-'.
 | 
			
		||||
				-- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
 | 
			
		||||
				separator = nil,
 | 
			
		||||
				zindex = 20, -- The Z-index of the context window
 | 
			
		||||
				on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching
 | 
			
		||||
			}
 | 
			
		||||
		end
 | 
			
		||||
	},
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user