From 56c01629c682063c87b762bb177a2980ff3ae7a4 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Sun, 30 Apr 2023 16:56:53 +0200 Subject: nvim add TS and use default color; git update color --- gitconfig | 2 +- nvim.init.vim | 22 ++++++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/gitconfig b/gitconfig index 948036a..b299cce 100644 --- a/gitconfig +++ b/gitconfig @@ -25,6 +25,6 @@ # %s commit message subject # %>(N) set width, padd space on the left # %<(N) set width, padd space on the right - pretty = format:%C(auto)%h %C(blue)%>(10)%ad %C(green)%>(8)%aN %C(auto)%d %Creset%s + pretty = format:%C(auto)%h %C(cyan)%>(10)%ad %C(green)%>(8)%aN %C(auto)%d %Creset%s [alias] graph = log --graph --decorate --pretty=oneline --abbrev-commit --all diff --git a/nvim.init.vim b/nvim.init.vim index aec04d2..c551b7e 100644 --- a/nvim.init.vim +++ b/nvim.init.vim @@ -32,15 +32,22 @@ call plug#begin('~/.nvim/plugged') Plug 'nvim-lua/plenary.nvim' Plug 'nvim-telescope/telescope.nvim' Plug 'nvim-telescope/telescope-fzf-native.nvim', { 'do': 'make' } + + " Treesitter + Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} + Plug 'nvim-treesitter/nvim-treesitter-context' call plug#end() " ----------------- " Setters. " ----------------- -set termguicolors +"set termguicolors set background=dark -colorscheme base16-default-dark +"colorscheme base16-default-dark +"colorscheme base16-onedark +highlight Pmenu ctermbg=DarkGray guibg=DarkGrey +highlight PmenuSel ctermfg=Black guifg=Black ctermbg=LightGray guibg=LightGray set relativenumber set number @@ -90,8 +97,8 @@ cmp.setup({ end, }, mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping.complete(), [''] = cmp.mapping.abort(), [''] = cmp.mapping.confirm({ select = false }), @@ -107,14 +114,17 @@ cmp.setup({ }) -- Setup lspconfig. -local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()) +local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()) + -- Disable LSP snippet completion. capabilities.textDocument.completion.completionItem.snippetSupport = false --print(vim.inspect(capabilities)) -local on_attach = function(_client, bufnr) +local on_attach = function(client, bufnr) -- Install `omnifunc` completion handler, get completion with . vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc") + -- Disable LSP highlighting. + client.server_capabilities.semanticTokensProvider = nil end -- Setup rust-analyzer. -- cgit v1.2.3