-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Add nvim-treesitter and other TS-related plugins:
- ts-comments.nvim to replace tcomment for comment handling (gcc map) - nvim-treesitter-context to show code context as the buffer is scrolled - indent-blankline.nvim to show indentation and scope guides - rainbow-delimiters.nvim to color-match delimiters - render-markdown.nvim for markdown rendering
- Loading branch information
Showing
8 changed files
with
94 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
return { | ||
"folke/ts-comments.nvim", | ||
opts = {}, | ||
event = "VeryLazy", | ||
enabled = vim.fn.has("nvim-0.10.0") == 1, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
return { | ||
"nvim-treesitter/nvim-treesitter-context", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
return { | ||
{ | ||
"lukas-reineke/indent-blankline.nvim", | ||
main = "ibl", | ||
---@module "ibl" | ||
---@type ibl.config | ||
|
||
config = function() | ||
-- Set line colors to be ones from Solarized | ||
local highlight = { | ||
"SolarizedMagenta", | ||
"SolarizedYellow", | ||
"SolarizedBlue", | ||
"SolarizedOrange", | ||
"SolarizedGreen", | ||
"SolarizedViolet", | ||
"SolarizedCyan", | ||
} | ||
|
||
local hooks = require("ibl.hooks") | ||
-- create the highlight groups in the highlight setup hook, so they are | ||
-- reset every time the colorscheme changes | ||
hooks.register(hooks.type.HIGHLIGHT_SETUP, function() | ||
vim.api.nvim_set_hl(0, "SolarizedMagenta", { fg = "#D33682" }) | ||
vim.api.nvim_set_hl(0, "SolarizedYellow", { fg = "#B58900" }) | ||
vim.api.nvim_set_hl(0, "SolarizedBlue", { fg = "#268BD2" }) | ||
vim.api.nvim_set_hl(0, "SolarizedOrange", { fg = "#CB4B16" }) | ||
vim.api.nvim_set_hl(0, "SolarizedGreen", { fg = "#859900" }) | ||
vim.api.nvim_set_hl(0, "SolarizedViolet", { fg = "#6C71C4" }) | ||
vim.api.nvim_set_hl(0, "SolarizedCyan", { fg = "#2AA198" }) | ||
end) | ||
|
||
-- Sync highlight colors with rainbow_delimiters | ||
vim.g.rainbow_delimiters = { highlight = highlight } | ||
|
||
local default_config = require("ibl.config").default_config | ||
require("ibl").setup({ | ||
-- Don't enable by default, so as to not distract with rainbow colors | ||
-- unless needed | ||
enabled = false, | ||
scope = { highlight = highlight }, | ||
indent = { | ||
highlight = highlight, | ||
-- Use default char instead of following listchars | ||
char = default_config.indent.tab_char, | ||
}, | ||
}) | ||
|
||
-- Sync scope line color with rainbow-delimiters | ||
hooks.register( | ||
hooks.type.SCOPE_HIGHLIGHT, | ||
hooks.builtin.scope_highlight_from_extmark | ||
) | ||
end, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
return { | ||
"https://gitlab.com/HiPhish/rainbow-delimiters.nvim", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
return { | ||
"MeanderingProgrammer/render-markdown.nvim", | ||
dependencies = { | ||
"nvim-treesitter/nvim-treesitter", | ||
"echasnovski/mini.icons", | ||
}, | ||
opts = {}, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
return { | ||
"nvim-treesitter/nvim-treesitter", | ||
build = ":TSUpdate", | ||
config = function() | ||
require("nvim-treesitter.configs").setup({ | ||
auto_install = true, | ||
highlight = { enable = true }, | ||
indent = { enable = true }, | ||
}) | ||
end, | ||
} |