fix local and google conflicts

This commit is contained in:
Christian Nieves
2022-12-12 17:52:11 +00:00
parent 493b91335d
commit 63b393c100
6 changed files with 60 additions and 60 deletions

View File

@ -0,0 +1 @@
private

Binary file not shown.

View File

@ -3,6 +3,51 @@ local use_google = require("utils").use_google
local lspconfig = require("lspconfig") local lspconfig = require("lspconfig")
local configs = require("lspconfig.configs") local configs = require("lspconfig.configs")
local notify = require 'notify' 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 if use_google() then
configs.ciderlsp = { configs.ciderlsp = {
default_config = { default_config = {
@ -286,48 +331,3 @@ if use_google() then
handlers = cider_lsp_handlers, handlers = cider_lsp_handlers,
}) })
end 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})

View File

@ -41,6 +41,7 @@ require('packer').startup(function(use)
use 'google/vim-searchindex' use 'google/vim-searchindex'
use 'ray-x/go.nvim' use 'ray-x/go.nvim'
use 'ray-x/guihua.lua' use 'ray-x/guihua.lua'
-- Pretty symbols -- Pretty symbols
use 'kyazdani42/nvim-web-devicons' use 'kyazdani42/nvim-web-devicons'
@ -147,6 +148,15 @@ require('packer').startup(function(use)
-- use { "catppuccin/nvim", as = "catppuccin" } -- use { "catppuccin/nvim", as = "catppuccin" }
use { "catppuccin/nvim", as = "catppuccin", config = [[require("catppuccin-config")]]} 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 -- mine
use { use {
@ -161,14 +171,8 @@ require('packer').startup(function(use)
use 'nathanaelkane/vim-indent-guides' use 'nathanaelkane/vim-indent-guides'
use 'tversteeg/registers.nvim' use 'tversteeg/registers.nvim'
use 'preservim/vimux' -- use 'christoomey/vim-titlecase'
use 'tmux-plugins/vim-tmux' -- use 'chiedo/vim-case-convert'
use 'christoomey/vim-tmux-navigator'
use 'whatyouhide/vim-tmux-syntax'
use 'skywind3000/asyncrun.vim'
use 'christoomey/vim-titlecase'
use 'chiedo/vim-case-convert'
use 'jremmen/vim-ripgrep' use 'jremmen/vim-ripgrep'
@ -177,7 +181,6 @@ require('packer').startup(function(use)
use 'udalov/kotlin-vim' use 'udalov/kotlin-vim'
use 'tmux-plugins/vim-tmux-focus-events'
use 'tpope/vim-obsession' use 'tpope/vim-obsession'
use 'Valloric/MatchTagAlways' use 'Valloric/MatchTagAlways'
use { use {

View File

@ -130,11 +130,6 @@ function! CitCWorkspace()
return l:workspace return l:workspace
endfunction endfunction
function! CitCObsession()
execute 'Obsess ~/.sessions/' . CitCWorkspace() . '.vim'
endfunction
function! G4Blame(...) function! G4Blame(...)
" Grab the filename from the argument, use expand() to expand '%'. " Grab the filename from the argument, use expand() to expand '%'.
if a:0 > 0 if a:0 > 0
@ -177,7 +172,6 @@ com! -nargs=? -complete=file Blame :call G4Blame(<f-args>)
" nnoremap <leader>CS :FzfCs<Space> <C-r><C-w> <cr> " nnoremap <leader>CS :FzfCs<Space> <C-r><C-w> <cr>
nnoremap <leader>cc :CritiqueUnresolvedComments<space><cr> nnoremap <leader>cc :CritiqueUnresolvedComments<space><cr>
nnoremap <leader>s :call CitCObsession()<CR>
" nnoremap <leader>ps :PiperSelectActiveFiles<CR> " nnoremap <leader>ps :PiperSelectActiveFiles<CR>
nnoremap <leader>ps :FzfHgFiles<CR> nnoremap <leader>ps :FzfHgFiles<CR>

View File

@ -125,3 +125,5 @@ function! <SID>SynStack()
endif endif
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")') echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunc endfunc
nnoremap <leader>s :SaveSession()<CR>