fix: nvim 0.10. breaking changes

This commit is contained in:
Max Hohlfeld 2024-05-20 15:12:14 +02:00
parent 8cf4f9d293
commit 03c3ccec72

View File

@ -32,7 +32,6 @@ require('packer').startup(function()
'nvim-treesitter/nvim-treesitter', -- Syntax Highlighting 'nvim-treesitter/nvim-treesitter', -- Syntax Highlighting
run = ':TSUpdate' run = ':TSUpdate'
} }
use 'tpope/vim-commentary' -- Commentary
use 'tpope/vim-surround' -- Surrounding use 'tpope/vim-surround' -- Surrounding
use 'tpope/vim-repeat' -- Repeat Surrounding use 'tpope/vim-repeat' -- Repeat Surrounding
use 'tpope/vim-sleuth' -- Detect Spacing use 'tpope/vim-sleuth' -- Detect Spacing
@ -58,7 +57,6 @@ require("zenburn").setup()
vim.g.mapleader = "," vim.g.mapleader = ","
opt.mouse = "nv" opt.mouse = "nv"
opt.pastetoggle = "ZP"
opt.number = true opt.number = true
opt.relativenumber = true opt.relativenumber = true
@ -119,7 +117,7 @@ _G.enable_spell = function(lang)
print("spellcheck disabled") print("spellcheck disabled")
end end
return vim.api.nvim_replace_termcodes('<cr>', true, true, true) -- return vim.api.nvim_replace_termcodes('<cr>', true, true, true)
end end
map('n', 'ZD', 'v:lua.enable_spell("de")', { expr = true, silent = true }) map('n', 'ZD', 'v:lua.enable_spell("de")', { expr = true, silent = true })
@ -193,7 +191,6 @@ lsp.lua_ls.setup {
} }
-- Autopairs -- Autopairs
require 'nvim-ts-autotag'.setup()
require 'nvim-autopairs'.setup {} require 'nvim-autopairs'.setup {}
-- Snippets -- Snippets
@ -217,7 +214,7 @@ ls.config.set_config({
}, },
}) })
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/lua/snippets" }) require("luasnip.loaders.from_lua").load({ paths = { "~/.config/nvim/lua/snippets" } })
-- Completion -- Completion
local cmp = require('cmp') local cmp = require('cmp')
@ -289,7 +286,8 @@ require('nvim-treesitter.configs').setup {
additional_vim_regex_highlighting = false, additional_vim_regex_highlighting = false,
}, },
autotag = { autotag = {
enable = true enable = true,
filetypes = { 'html', 'htmldjango', 'xml', 'javascript', 'typescript', 'javascriptreact', 'typescriptreact', 'svelte', 'vue' }
} }
} }
@ -439,4 +437,4 @@ require("auto-session").setup {
log_level = "error" log_level = "error"
} }
opt.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions" -- opt.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal"