From eb8d6132e7907074654c96646e0917d542b0d393 Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Sat, 8 Jul 2023 23:02:56 +0200 Subject: [PATCH] fixed slow nvim startup --- config/nvim/init.lua | 21 ++++----------------- gitconfig | 4 ++++ 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/config/nvim/init.lua b/config/nvim/init.lua index 05e9109..a78c3a9 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -12,9 +12,6 @@ vim.wo.number = true -- Enable mouse mode vim.o.mouse = 'a' --- Sync clipboard between OS and Neovim. -vim.o.clipboard = 'unnamedplus' - -- Enable break indent vim.o.breakindent = true @@ -94,6 +91,7 @@ require('lazy').setup({ { dir = "~/code_server/nightly_cm.nvim", + lazy = false, priority = 1000, config = function() vim.cmd.colorscheme 'nightly_cm' @@ -470,9 +468,6 @@ require('lazy').setup({ "folke/todo-comments.nvim", dependencies = { "nvim-lua/plenary.nvim" }, opts = { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below } }, @@ -489,9 +484,6 @@ require('lazy').setup({ "folke/trouble.nvim", dependencies = { "nvim-tree/nvim-web-devicons" }, opts = { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below }, }, @@ -529,7 +521,7 @@ local on_attach = function(_, bufnr) nmap('D', vim.lsp.buf.type_definition, 'Type Definition') nmap('K', vim.lsp.buf.hover, 'Hover Documentation') nmap('', vim.lsp.buf.signature_help, 'Signature Documentation') - -- nmap('', vim.lsp.buf.format(), 'Format current buffer with LSP') + nmap('', vim.lsp.buf.format(), 'Format current buffer') nmap('ds', require('telescope.builtin').lsp_document_symbols, 'Document Symbols') nmap('ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, 'Workspace Symbols') @@ -551,12 +543,7 @@ local servers = { cmd = { 'clangd', '--background-index' }, filetypes = { 'c', 'cpp', 'objc', 'objcpp' }, }, - rust_analyzer = { - -- rust = { - -- target = "thumbv7em-none-eabihf", - -- all_targets = false - -- } - }, + rust_analyzer = {}, bashls = {}, pyright = {}, marksman = {}, @@ -854,7 +841,7 @@ vim.keymap.set('n', 'sg', require('telescope.builtin').live_grep, { desc vim.keymap.set('n', 'sd', require('telescope.builtin').diagnostics, { desc = 'Search diagnostics' }) vim.keymap.set('n', '', ":tabNext", { desc = 'Next tab', silent = true }) -vim.keymap.set('n', '', ":Format", { desc = 'Format code', silent = true }) +-- vim.keymap.set('n', '', ":Format", { desc = 'Format code', silent = true }) vim.keymap.set('n', 'gg', ":LazyGitCurrentFile", { desc = 'Format code', silent = true }) vim.keymap.set('n', '', ":make", { desc = 'Format code', silent = true }) vim.keymap.set('n', '', ":make clean", { desc = 'Format code', silent = true }) diff --git a/gitconfig b/gitconfig index 2cdcc49..e1a2ca2 100644 --- a/gitconfig +++ b/gitconfig @@ -10,3 +10,7 @@ email = cm@cmtec.se [pull] rebase = false +[merge] + tool = nvimdiff +[mergetool] + keepBackup = false