update telescope and treesitter for nvim v0.12
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
local opt = vim.opt
|
||||
|
||||
vim.filetype.add({ extension = { mdx = 'mdx' } })
|
||||
|
||||
-- numbers
|
||||
opt.relativenumber = true
|
||||
opt.number = true
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
local lazypath = vim.fn.stdpath('data') .. 'lazy/lazy.nvim'
|
||||
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
|
||||
|
||||
-- bootstrap lazy
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
|
||||
@ -85,7 +85,16 @@ return {
|
||||
-- Explicitly enable all mason-managed servers.
|
||||
-- This is belt-and-suspenders alongside mason-lspconfig's automatic_enable,
|
||||
-- ensuring servers start regardless of mason-lspconfig version.
|
||||
vim.lsp.enable({ 'lua_ls', 'html', 'cssls', 'bashls', 'ts_ls', 'eslint', 'tailwindcss' })
|
||||
vim.lsp.enable({ 'lua_ls', 'html', 'cssls', 'bashls', 'ts_ls', 'eslint', 'tailwindcss', 'mdx_analyzer' })
|
||||
|
||||
-- mdx_analyzer: needs typescript SDK path to find tsserverlibrary.js
|
||||
vim.lsp.config('mdx_analyzer', {
|
||||
init_options = {
|
||||
typescript = {
|
||||
tsdk = vim.fn.stdpath('data') .. '/mason/packages/typescript-language-server/node_modules/typescript/lib',
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- hyprls: not managed by mason, enable manually
|
||||
vim.lsp.config('hyprls', {
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
branch = '0.1.x',
|
||||
'nvim-telescope/telescope.nvim', -- 0.1.x dropped; master has nvim 0.12 compat (ft_to_lang removal)
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||||
|
||||
@ -1,23 +1,18 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
branch = "main", -- master is frozen; main required for nvim 0.12+
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
build = ":TSUpdate",
|
||||
dependencies = {
|
||||
"windwp/nvim-ts-autotag",
|
||||
},
|
||||
config = function()
|
||||
local treesitter = require('nvim-treesitter.configs')
|
||||
|
||||
treesitter.setup({
|
||||
require('nvim-treesitter').setup({
|
||||
auto_install = true,
|
||||
sync_install = false,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
prefer_git = true, -- tarball downloads fail for some parsers on 0.12
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
autotag = { enable = true },
|
||||
ensure_installed = {
|
||||
install = {
|
||||
'json',
|
||||
'javascript',
|
||||
'typescript',
|
||||
@ -35,17 +30,10 @@ return {
|
||||
'python',
|
||||
'gitignore',
|
||||
'c',
|
||||
},
|
||||
ignore_install = {},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = '<C-Space>',
|
||||
node_incremental = '<C-Space>',
|
||||
scope_incremental = false,
|
||||
node_decremental = '<bs>',
|
||||
},
|
||||
'mdx',
|
||||
},
|
||||
})
|
||||
|
||||
require('nvim-ts-autotag').setup()
|
||||
end,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user