]> git.huck.website - nvim.git/commitdiff
merged: updated nvim settings
authorHuck Boles <huck.boles@metalplasmatechnology.com>
Tue, 12 Mar 2024 15:00:13 +0000 (08:00 -0700)
committerHuck Boles <huck.boles@metalplasmatechnology.com>
Tue, 12 Mar 2024 15:00:13 +0000 (08:00 -0700)
1  2 
lua/plugins/cmp.lua
lua/plugins/lsp.lua

Simple merge
index 50a4873b170216dc3e842f48183f9b363a5aa869,93ba93e13ce2babd19d0cb0d7ecdd1332690f368..93548a08ef9ed3c1788e1c37bf933e793d89a28c
@@@ -79,44 -85,106 +79,44 @@@ 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 orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
-                       function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
-                               opts = opts or {}
-                               opts.border = opts.border or border
-                               return orig_util_open_floating_preview(contents, syntax, opts, ...)
-                       end
+             local floating_preview = vim.lsp.util.open_floating_preview
+             function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
+                 opts = opts or {}
+                 opts.border = opts.border or border
+                 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,
 -    },
 -
 -    {
 -        'simrat39/rust-tools.nvim',
 -        event = { "BufReadPost *.rs" },
 -        config = function()
 -            local rust = require("rust-tools")
 -            rust.setup(
 -                {
 -                    tools = {
 -                        inlay_hints = {
 -                            only_current_line = true,
 -                            parameter_hints_prefix = "",
 -                            other_hints_prefix = "-> "
 -                        },
 -                        hover_actions = {
 -                            border = border,
 -                            auto_focus = true,
 -                            max_width = nil,
 -                            max_height = nil,
 -                        }
 -                    },
 -                    server = {
 -                        standalone = false,
 -                        settings = {
 -                            ['rust-analyzer'] = {
 -                                completion = {
 -                                    callable = { snippets = "add_parentheses" }
 -                                },
 -                                hover = {
 -                                    actions = {
 -                                        references = { enable = true },
 -                                    }
 -                                },
 -                                imports = {
 -                                    granularity = { enforce = true }
 -                                },
 -                                inlay_hints = {
 -                                    closureReturnTypeHints = { enable = 'with_block' },
 -                                    lifetimeElisionHints = { enable = 'skip_trivial' },
 -                                }
 -                            }
 -                        },
 -                        on_attach = function(_, bufnr)
 -                            keybinds()
 -                            vim.keymap.set('n', '<LEADER>k', rust.hover_actions.hover_actions, { buffer = bufnr })
 -                            vim.keymap.set('n', '<LEADER>a', rust.code_action_group.code_action_group, { buffer = bufnr })
 -                            vim.keymap.set('n', '<LEADER>m', rust.expand_macro.expand_macro, { buffer = bufnr })
 -                            vim.keymap.set('n', '<LEADER>c', rust.open_cargo_toml.open_cargo_toml, { buffer = bufnr })
 -                            vim.keymap.set('n', '<LEADER>P', rust.parent_module.parent_module, { buffer = bufnr })
 -                        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" }
 +        event = { "BufReadPost *.jl" },
      },
 +
  }