From: Huck Boles Date: Mon, 15 Apr 2024 18:03:07 +0000 (-0700) Subject: removed: tpope/vimcommentary for integrated treesitter X-Git-Url: https://git.huck.website/?a=commitdiff_plain;h=fe61ce6982c60556dc2e45213250c98b5a2deabc;p=nvim.git removed: tpope/vimcommentary for integrated treesitter --- diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 93548a0..8e4ebaf 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -1,72 +1,72 @@ local border = { - { "┏", "FloatBorder" }, - { "━", "FloatBorder" }, - { "┓", "FloatBorder" }, - { "┃", "FloatBorder" }, - { "┛", "FloatBorder" }, - { "━", "FloatBorder" }, - { "┗", "FloatBorder" }, - { "┃", "FloatBorder" }, + { "┏", "FloatBorder" }, + { "━", "FloatBorder" }, + { "┓", "FloatBorder" }, + { "┃", "FloatBorder" }, + { "┛", "FloatBorder" }, + { "━", "FloatBorder" }, + { "┗", "FloatBorder" }, + { "┃", "FloatBorder" }, } local keybinds = function() - vim.keymap.set('n', 'n', vim.diagnostic.goto_next) - vim.keymap.set('n', 'p', vim.diagnostic.goto_prev) - vim.keymap.set('n', 'r', vim.lsp.buf.rename) - vim.keymap.set('n', 'a', vim.lsp.buf.code_action) - vim.keymap.set('n', 'k', vim.lsp.buf.hover) - vim.keymap.set('n', 'K', vim.diagnostic.open_float) - vim.keymap.set('n', '', vim.lsp.buf.definition) + vim.keymap.set('n', 'n', vim.diagnostic.goto_next) + vim.keymap.set('n', 'p', vim.diagnostic.goto_prev) + vim.keymap.set('n', 'r', vim.lsp.buf.rename) + vim.keymap.set('n', 'a', vim.lsp.buf.code_action) + vim.keymap.set('n', 'k', vim.lsp.buf.hover) + vim.keymap.set('n', 'K', vim.diagnostic.open_float) + vim.keymap.set('n', '', vim.lsp.buf.definition) - -- toggle lsp diagnostics - vim.keymap.set('n', 'd', - function() - if vim.g.visible_diagnostics then - vim.diagnostic.disable() - vim.g.visible_diagnostics = false - else - vim.diagnostic.enable() - vim.g.visible_diagnostics = true - end - end - ) + -- toggle lsp diagnostics + vim.keymap.set('n', 'd', + function() + if vim.g.visible_diagnostics then + vim.diagnostic.disable() + vim.g.visible_diagnostics = false + else + vim.diagnostic.enable() + vim.g.visible_diagnostics = true + end + end + ) end return { - { - "williamboman/mason-lspconfig", - dependencies = { - "nvim-treesitter", - { - "williamboman/mason.nvim", - build = ":MasonUpdate", - config = function() - require("mason").setup() - end, - }, - }, - version = "1.3.0", - config = function() - require("mason-lspconfig").setup({ - automatic_installation = false, - ensure_installed = {}, - }) - end, - }, + { + "williamboman/mason-lspconfig", + dependencies = { + "nvim-treesitter", + { + "williamboman/mason.nvim", + build = ":MasonUpdate", + config = function() + require("mason").setup() + end, + }, + }, + version = "1.3.0", + config = function() + require("mason-lspconfig").setup({ + automatic_installation = false, + ensure_installed = {}, + }) + end, + }, - { - "neovim/nvim-lspconfig", - event = { "BufReadPre", "BufNewFile" }, - lazy = false, - dependencies = { - "mason-lspconfig", - "nvim-cmp", - "nvim-treesitter", - "Maan2003/lsp_lines.nvim", - }, - config = function() - -- servers to setup - local lsp = require("lspconfig") + { + "neovim/nvim-lspconfig", + event = { "BufReadPre", "BufNewFile" }, + lazy = false, + dependencies = { + "mason-lspconfig", + "nvim-cmp", + "nvim-treesitter", + "Maan2003/lsp_lines.nvim", + }, + config = function() + -- servers to setup + local lsp = require("lspconfig") lsp.julials.setup({ on_attach = keybinds }) lsp.texlab.setup({ on_attach = keybinds }) @@ -79,23 +79,23 @@ return { } }) - -- diagnostic settings - vim.lsp.diagnostics = { - signs = true, - underline = true, - update_in_insert = false, - severity_sort = { reverse = false }, - } + -- diagnostic settings + vim.lsp.diagnostics = { + signs = true, + underline = true, + update_in_insert = false, + severity_sort = { reverse = false }, + } - -- don't override treesitter colors - vim.highlight.priorities.semantic_tokens = 95 + -- don't override treesitter colors + vim.highlight.priorities.semantic_tokens = 95 - -- custom signs - local signs = { Error = ">>", Warn = "> ", Hint = "- ", Info = "* " } - for type, icon in pairs(signs) do - local hl = "DiagnosticSign" .. type - vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) - end + -- custom signs + local signs = { Error = ">>", Warn = "> ", Hint = "- ", Info = "* " } + for type, icon in pairs(signs) do + local hl = "DiagnosticSign" .. type + vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) + end local floating_preview = vim.lsp.util.open_floating_preview function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...) @@ -104,16 +104,16 @@ return { return floating_preview(contents, syntax, opts, ...) end - -- auto format code on save - vim.api.nvim_create_autocmd("BufWritePre", { - pattern = { "*" }, - callback = function() - vim.lsp.buf.format() - end, - }) - end, - }, - + -- auto format code on save + vim.api.nvim_create_autocmd("BufWritePre", { + pattern = { "*" }, + callback = function() + vim.lsp.buf.format() + end, + }) + end, + }, + { 'JuliaEditorSupport/julia-vim', event = { "BufReadPost *.jl" }, diff --git a/lua/plugins/tpope.lua b/lua/plugins/tpope.lua index ac11a28..9582ef2 100644 --- a/lua/plugins/tpope.lua +++ b/lua/plugins/tpope.lua @@ -1,12 +1,11 @@ return { - { 'tpope/vim-repeat', event = "VeryLazy" }, - { 'tpope/vim-surround', event = "VeryLazy" }, - { 'tpope/vim-endwise', event = "VeryLazy" }, - { 'tpope/vim-commentary', event = "VeryLazy" }, + { 'tpope/vim-repeat', event = "VeryLazy" }, + { 'tpope/vim-surround', event = "VeryLazy" }, + { 'tpope/vim-endwise', event = "VeryLazy" }, { 'tpope/vim-fugitive', keys = { - { 'gg', 'Git' }, + { '{LEADER}gg', 'Git' }, { 'gc', 'Git commit' }, { 'ga', 'Git add %' }, { 'gd', 'Gdiffsplit' },