save
This commit is contained in:
@@ -8,22 +8,24 @@
|
|||||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "70019124aa4f2e6838be9fbd2007f6d13b27a96d" },
|
"conform.nvim": { "branch": "master", "commit": "70019124aa4f2e6838be9fbd2007f6d13b27a96d" },
|
||||||
"dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" },
|
"dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" },
|
||||||
"fidget.nvim": { "branch": "main", "commit": "9238947645ce17d96f30842e61ba81147185b657" },
|
"fidget.nvim": { "branch": "main", "commit": "a0abbf18084b77d28bc70e24752e4f4fd54aea17" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" },
|
"gitsigns.nvim": { "branch": "main", "commit": "9541f5e8e24571723cb02a5c2bf078aeacc5a711" },
|
||||||
"harpoon": { "branch": "harpoon2", "commit": "a84ab829eaf3678b586609888ef52f7779102263" },
|
"harpoon": { "branch": "harpoon2", "commit": "a84ab829eaf3678b586609888ef52f7779102263" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "72aa3a2624be5dc240646084f7b6a38eb99eb2ce" },
|
"lazy.nvim": { "branch": "main", "commit": "d8f26efd456190241afd1b0f5235fe6fdba13d4a" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "97d9f1d3ad205dece6bcafd1d71cf1507608f3c7" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "e942edf5c85b6a2ab74059ea566cac5b3e1514a4" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "4c1ca8268569bfc6d487473cd17b167560e5bed2" },
|
"nvim-cmp": { "branch": "main", "commit": "8c82d0bd31299dbff7f8e780f5e06d2283de9678" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "8121483b8132b7053120fafd83728178fb3febf6" },
|
"nvim-lspconfig": { "branch": "master", "commit": "339ccc81e08793c3af9b83882a6ebd90c9cc0d3b" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "5740b7382429d20b6ed0bbdb0694185af9507d44" },
|
"nvim-treesitter": { "branch": "master", "commit": "f0c928dbe93533b7e35894a8f957f40150d1f663" },
|
||||||
"oil.nvim": { "branch": "master", "commit": "c12fad2d225d8f81fadd48521d253607fe25465c" },
|
"nvim-web-devicons": { "branch": "master", "commit": "aafa5c187a15701a7299a392b907ec15d9a7075f" },
|
||||||
|
"oil.nvim": { "branch": "master", "commit": "09fa1d22f5edf0730824d2b222d726c8c81bbdc9" },
|
||||||
"paint.nvim": { "branch": "main", "commit": "ef6f717a8669619ebbd098fb72f85115d64c6c92" },
|
"paint.nvim": { "branch": "main", "commit": "ef6f717a8669619ebbd098fb72f85115d64c6c92" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
"plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" },
|
||||||
"rose-pine": { "branch": "main", "commit": "91548dca53b36dbb9d36c10f114385f759731be1" },
|
"rose-pine": { "branch": "main", "commit": "719ec67bf51efdd778c3a7855a135a8d6d362959" },
|
||||||
"snacks.nvim": { "branch": "main", "commit": "ee08b1f32e06904318f8fa24714557d3abcdd215" },
|
"snacks.nvim": { "branch": "main", "commit": "09d563e223cf7f51e34d406c0f0e44eae1b4227f" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" },
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "7bb270adaa7692c2c33befc35f5567fc596a2504" },
|
"telescope.nvim": { "branch": "master", "commit": "415af52339215926d705cccc08145f3782c4d132" },
|
||||||
|
"tokyonight.nvim": { "branch": "main", "commit": "775f82f08a3d1fb55a37fc6d3a4ab10cd7ed8a10" },
|
||||||
"vim-fugitive": { "branch": "master", "commit": "174230d6a7f2df94705a7ffd8d5413e27ec10a80" },
|
"vim-fugitive": { "branch": "master", "commit": "174230d6a7f2df94705a7ffd8d5413e27ec10a80" },
|
||||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }
|
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,44 +1,49 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-telescope/telescope.nvim",
|
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
local data = assert(vim.fn.stdpath "data") --[[@as string]]
|
||||||
|
|
||||||
|
require("telescope").setup {
|
||||||
|
extensions = {
|
||||||
|
wrap_results = true,
|
||||||
|
|
||||||
|
fzf = {},
|
||||||
|
history = {
|
||||||
|
path = vim.fs.joinpath(data, "telescope_history.sqlite3"),
|
||||||
|
limit = 100,
|
||||||
|
},
|
||||||
|
["ui-select"] = {
|
||||||
|
require("telescope.themes").get_dropdown {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
pcall(require("telescope").load_extension, "fzf")
|
||||||
|
pcall(require("telescope").load_extension, "smart_history")
|
||||||
|
pcall(require("telescope").load_extension, "ui-select")
|
||||||
|
|
||||||
|
local builtin = require "telescope.builtin"
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<space>pf", builtin.find_files)
|
||||||
|
vim.keymap.set("n", "<C-p>", builtin.git_files)
|
||||||
|
vim.keymap.set("n", "<space>fh", builtin.help_tags)
|
||||||
|
vim.keymap.set("n", "<space>fg", builtin.git_files)
|
||||||
|
vim.keymap.set("n", "<space>/", builtin.current_buffer_fuzzy_find)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>ps", function()
|
||||||
|
builtin.grep_string { search = vim.fn.input "Grep > " }
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<space>en", function()
|
||||||
|
builtin.find_files { cwd = vim.fn.stdpath "config" }
|
||||||
|
end)
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
config = function()
|
|
||||||
local data = assert(vim.fn.stdpath "data") --[[@as string]]
|
|
||||||
|
|
||||||
require("telescope").setup {
|
|
||||||
extensions = {
|
|
||||||
wrap_results = true,
|
|
||||||
|
|
||||||
fzf = {},
|
|
||||||
history = {
|
|
||||||
path = vim.fs.joinpath(data, "telescope_history.sqlite3"),
|
|
||||||
limit = 100,
|
|
||||||
},
|
|
||||||
["ui-select"] = {
|
|
||||||
require("telescope.themes").get_dropdown {},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
pcall(require("telescope").load_extension, "fzf")
|
|
||||||
pcall(require("telescope").load_extension, "smart_history")
|
|
||||||
pcall(require("telescope").load_extension, "ui-select")
|
|
||||||
|
|
||||||
local builtin = require "telescope.builtin"
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<space>fd", builtin.find_files)
|
|
||||||
vim.keymap.set("n", "<C-p>", builtin.git_files)
|
|
||||||
vim.keymap.set("n", "<space>fh", builtin.help_tags)
|
|
||||||
vim.keymap.set("n", "<space>fg", builtin.live_grep)
|
|
||||||
vim.keymap.set("n", "<space>/", builtin.current_buffer_fuzzy_find)
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<space>fw", builtin.grep_string)
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<space>fn", function()
|
|
||||||
builtin.find_files { cwd = vim.fn.stdpath "config" }
|
|
||||||
end)
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|||||||
66
nvim/.config/nvim/lua/vxclutch/lazy/treesitter.lua
Normal file
66
nvim/.config/nvim/lua/vxclutch/lazy/treesitter.lua
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
return {
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
build = ":TSUpdate",
|
||||||
|
config = function()
|
||||||
|
require("nvim-treesitter.configs").setup {
|
||||||
|
-- A list of parser names, or "all"
|
||||||
|
ensure_installed = {
|
||||||
|
"vimdoc",
|
||||||
|
"c",
|
||||||
|
"lua",
|
||||||
|
"bash",
|
||||||
|
"java",
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||||
|
sync_install = false,
|
||||||
|
|
||||||
|
-- Automatically install missing parsers when entering buffer
|
||||||
|
-- Recommendation: set to false if you don"t have `tree-sitter` CLI installed locally
|
||||||
|
auto_install = true,
|
||||||
|
|
||||||
|
indent = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
highlight = {
|
||||||
|
-- `false` will disable the whole extension
|
||||||
|
enable = true,
|
||||||
|
disable = function(lang, buf)
|
||||||
|
if lang == "html" then
|
||||||
|
print "disabled"
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
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
|
||||||
|
vim.notify(
|
||||||
|
"File larger than 100KB treesitter disabled for performance",
|
||||||
|
vim.log.levels.WARN,
|
||||||
|
{ title = "Treesitter" }
|
||||||
|
)
|
||||||
|
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 = { "markdown" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
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,
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user