Migrate to native lsp config and other misc stuff
This commit is contained in:
parent
50031cba0e
commit
2b05047eb9
21 changed files with 82 additions and 40 deletions
|
|
@ -1,9 +1,55 @@
|
|||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
run = ':TSUpdate',
|
||||
dependencies = { 'nvim-treesitter/nvim-treesitter-textobjects' },
|
||||
build = ':TSUpdate',
|
||||
-- dependencies = { 'nvim-treesitter/nvim-treesitter-textobjects' },
|
||||
-- branch = 'main',
|
||||
branch = 'master',
|
||||
lazy = false,
|
||||
|
||||
config = function()
|
||||
-- require 'nvim-treesitter'.setup {
|
||||
-- -- Directory to install parsers and queries to
|
||||
-- install_dir = vim.fn.stdpath('data') .. '/site'
|
||||
-- }
|
||||
--
|
||||
--
|
||||
-- local ensureInstalled = {
|
||||
-- "c",
|
||||
-- "lua",
|
||||
-- "vim",
|
||||
-- "vimdoc",
|
||||
-- "query",
|
||||
-- "elixir",
|
||||
-- "heex",
|
||||
-- "javascript",
|
||||
-- "html",
|
||||
-- "markdown",
|
||||
-- "markdown_inline",
|
||||
-- "html",
|
||||
-- "jsdoc",
|
||||
-- "hurl",
|
||||
-- "typescript",
|
||||
-- "json"
|
||||
-- }
|
||||
-- local alreadyInstalled = require("nvim-treesitter.config").get_installed()
|
||||
-- local parsersToInstall = vim.iter(ensureInstalled)
|
||||
-- :filter(function(parser) return not vim.tbl_contains(alreadyInstalled, parser) end)
|
||||
-- :totable()
|
||||
-- require("nvim-treesitter").install(parsersToInstall)
|
||||
--
|
||||
-- vim.api.nvim_create_autocmd("FileType", {
|
||||
-- desc = "User: enable treesitter highlighting",
|
||||
-- callback = function(ctx)
|
||||
-- -- highlights
|
||||
-- local hasStarted = pcall(vim.treesitter.start) -- errors for filetypes with no parser
|
||||
--
|
||||
-- -- indent
|
||||
-- local noIndent = {}
|
||||
-- if hasStarted and not vim.list_contains(noIndent, ctx.match) then
|
||||
-- vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||
-- end
|
||||
-- end,
|
||||
-- })
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {
|
||||
"c",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue