From 63b393c1008af592caa474cdcf9c85c3389ac23f Mon Sep 17 00:00:00 2001 From: Christian Nieves Date: Mon, 12 Dec 2022 17:52:11 +0000 Subject: [PATCH] fix local and google conflicts --- config/.config/nvim/spell/en.utf-8.add | 1 + config/.config/nvim/spell/en.utf-8.add.spl | Bin 0 -> 39 bytes vim/.vim/lua/lsp.lua | 90 ++++++++++----------- vim/.vim/lua/plugins.lua | 21 ++--- vim/.vim/prefs/google.vim | 6 -- vim/.vim/prefs/leader.vim | 2 + 6 files changed, 60 insertions(+), 60 deletions(-) create mode 100644 config/.config/nvim/spell/en.utf-8.add create mode 100644 config/.config/nvim/spell/en.utf-8.add.spl diff --git a/config/.config/nvim/spell/en.utf-8.add b/config/.config/nvim/spell/en.utf-8.add new file mode 100644 index 0000000..3e18ebf --- /dev/null +++ b/config/.config/nvim/spell/en.utf-8.add @@ -0,0 +1 @@ +private diff --git a/config/.config/nvim/spell/en.utf-8.add.spl b/config/.config/nvim/spell/en.utf-8.add.spl new file mode 100644 index 0000000000000000000000000000000000000000..06085bc86180cf30a34a6c258c3a36ad899630bd GIT binary patch literal 39 ncmWIZ^erw(&B-zP&%nSSz*xXo#F)ug#+b-h!kEek6oLW($C?LG literal 0 HcmV?d00001 diff --git a/vim/.vim/lua/lsp.lua b/vim/.vim/lua/lsp.lua index b7ce6b4..e99dda7 100644 --- a/vim/.vim/lua/lsp.lua +++ b/vim/.vim/lua/lsp.lua @@ -3,6 +3,51 @@ local use_google = require("utils").use_google local lspconfig = require("lspconfig") local configs = require("lspconfig.configs") local notify = require 'notify' + +require("mason").setup() +require("mason-lspconfig").setup({ + ensure_installed = { "sumneko_lua", "rust_analyzer" } +}) + +local lsp = require('lsp-zero') +lsp.preset('manual-setup') + +local rust_lsp = lsp.build_options('rust_analyzer', {}) + +lsp.nvim_workspace() +lsp.setup() + +local runtime_path = vim.split(package.path, ";") +table.insert(runtime_path, "lua/?.lua") +table.insert(runtime_path, "lua/?/init.lua") + +lspconfig.sumneko_lua.setup({ + settings = { + Lua = { + runtime = { + -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) + version = "LuaJIT", + -- Setup your lua path + path = runtime_path, + }, + diagnostics = { + -- Get the language server to recognize the `vim` global + globals = { "vim" }, + }, + workspace = { + -- Make the server aware of Neovim runtime files + library = vim.api.nvim_get_runtime_file("", true), + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { + enable = false, + }, + }, + }, +}) + +-- Initialize rust_analyzer with rust-tools +require('rust-tools').setup({server = rust_lsp}) if use_google() then configs.ciderlsp = { default_config = { @@ -286,48 +331,3 @@ if use_google() then handlers = cider_lsp_handlers, }) end - -local runtime_path = vim.split(package.path, ";") -table.insert(runtime_path, "lua/?.lua") -table.insert(runtime_path, "lua/?/init.lua") - -lspconfig.sumneko_lua.setup({ - settings = { - Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) - version = "LuaJIT", - -- Setup your lua path - path = runtime_path, - }, - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = { "vim" }, - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file("", true), - }, - -- Do not send telemetry data containing a randomized but unique identifier - telemetry = { - enable = false, - }, - }, - }, -}) - -require("mason").setup() -require("mason-lspconfig").setup({ - ensure_installed = { "sumneko_lua", "rust_analyzer" } -}) - - -local lsp = require('lsp-zero') -lsp.preset('manual-setup') - -local rust_lsp = lsp.build_options('rust_analyzer', {}) - -lsp.setup() - --- Initialize rust_analyzer with rust-tools -require('rust-tools').setup({server = rust_lsp}) diff --git a/vim/.vim/lua/plugins.lua b/vim/.vim/lua/plugins.lua index 2c48e2e..b0bfd15 100644 --- a/vim/.vim/lua/plugins.lua +++ b/vim/.vim/lua/plugins.lua @@ -41,6 +41,7 @@ require('packer').startup(function(use) use 'google/vim-searchindex' use 'ray-x/go.nvim' use 'ray-x/guihua.lua' + -- Pretty symbols use 'kyazdani42/nvim-web-devicons' @@ -147,6 +148,15 @@ require('packer').startup(function(use) -- use { "catppuccin/nvim", as = "catppuccin" } use { "catppuccin/nvim", as = "catppuccin", config = [[require("catppuccin-config")]]} + -- Tmux + use { + 'preservim/vimux', + 'tmux-plugins/vim-tmux', + 'christoomey/vim-tmux-navigator', + 'whatyouhide/vim-tmux-syntax', + 'tmux-plugins/vim-tmux-focus-events', + 'skywind3000/asyncrun.vim', + } -- mine use { @@ -161,14 +171,8 @@ require('packer').startup(function(use) use 'nathanaelkane/vim-indent-guides' use 'tversteeg/registers.nvim' - use 'preservim/vimux' - use 'tmux-plugins/vim-tmux' - use 'christoomey/vim-tmux-navigator' - use 'whatyouhide/vim-tmux-syntax' - use 'skywind3000/asyncrun.vim' - - use 'christoomey/vim-titlecase' - use 'chiedo/vim-case-convert' + -- use 'christoomey/vim-titlecase' + -- use 'chiedo/vim-case-convert' use 'jremmen/vim-ripgrep' @@ -177,7 +181,6 @@ require('packer').startup(function(use) use 'udalov/kotlin-vim' - use 'tmux-plugins/vim-tmux-focus-events' use 'tpope/vim-obsession' use 'Valloric/MatchTagAlways' use { diff --git a/vim/.vim/prefs/google.vim b/vim/.vim/prefs/google.vim index fbf749b..a0e017f 100644 --- a/vim/.vim/prefs/google.vim +++ b/vim/.vim/prefs/google.vim @@ -130,11 +130,6 @@ function! CitCWorkspace() return l:workspace endfunction -function! CitCObsession() - execute 'Obsess ~/.sessions/' . CitCWorkspace() . '.vim' -endfunction - - function! G4Blame(...) " Grab the filename from the argument, use expand() to expand '%'. if a:0 > 0 @@ -177,7 +172,6 @@ com! -nargs=? -complete=file Blame :call G4Blame() " nnoremap CS :FzfCs nnoremap cc :CritiqueUnresolvedComments -nnoremap s :call CitCObsession() " nnoremap ps :PiperSelectActiveFiles nnoremap ps :FzfHgFiles diff --git a/vim/.vim/prefs/leader.vim b/vim/.vim/prefs/leader.vim index 19c33d2..a0f37f0 100644 --- a/vim/.vim/prefs/leader.vim +++ b/vim/.vim/prefs/leader.vim @@ -125,3 +125,5 @@ function! SynStack() endif echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")') endfunc + +nnoremap s :SaveSession()