]> git.huck.website - nvim.git/commitdiff
removed: tpope/vimcommentary for integrated treesitter
authorHuck Boles <huck.boles@metalplasmatechnology.com>
Mon, 15 Apr 2024 18:03:07 +0000 (11:03 -0700)
committerHuck Boles <huck.boles@metalplasmatechnology.com>
Mon, 15 Apr 2024 18:03:07 +0000 (11:03 -0700)
lua/plugins/lsp.lua
lua/plugins/tpope.lua

index 93548a08ef9ed3c1788e1c37bf933e793d89a28c..8e4ebaf715ebb683418f67b9cf27d249c722774a 100644 (file)
@@ -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', '<LEADER>n', vim.diagnostic.goto_next)
-       vim.keymap.set('n', '<LEADER>p', vim.diagnostic.goto_prev)
-       vim.keymap.set('n', '<LEADER>r', vim.lsp.buf.rename)
-       vim.keymap.set('n', '<LEADER>a', vim.lsp.buf.code_action)
-       vim.keymap.set('n', '<LEADER>k', vim.lsp.buf.hover)
-       vim.keymap.set('n', '<LEADER>K', vim.diagnostic.open_float)
-       vim.keymap.set('n', '<C-]>', vim.lsp.buf.definition)
+    vim.keymap.set('n', '<LEADER>n', vim.diagnostic.goto_next)
+    vim.keymap.set('n', '<LEADER>p', vim.diagnostic.goto_prev)
+    vim.keymap.set('n', '<LEADER>r', vim.lsp.buf.rename)
+    vim.keymap.set('n', '<LEADER>a', vim.lsp.buf.code_action)
+    vim.keymap.set('n', '<LEADER>k', vim.lsp.buf.hover)
+    vim.keymap.set('n', '<LEADER>K', vim.diagnostic.open_float)
+    vim.keymap.set('n', '<C-]>', vim.lsp.buf.definition)
 
-       -- toggle lsp diagnostics
-       vim.keymap.set('n', '<LEADER>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', '<LEADER>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" },
index ac11a28627302f66f4a4bd0808135a2d5af34269..9582ef2d5efa26fdb6b5f7b2efc8a8518e6d1b39 100644 (file)
@@ -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 = {
-            { '<LEADER>gg', '<CMD>Git<CR>' },
+            { '{LEADER}gg', '<CMD>Git<CR>' },
             { '<LEADER>gc', '<CMD>Git commit<CR>' },
             { '<LEADER>ga', '<CMD>Git add %<CR>' },
             { '<LEADER>gd', '<CMD>Gdiffsplit<CR>' },