This repository has been archived by the owner on Feb 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init-nvim-lsp.vim
115 lines (97 loc) · 3.23 KB
/
init-nvim-lsp.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
call plug#begin('~/.config/nvim/plugged')
" lsp Plugins
Plug 'neovim/nvim-lspconfig'
Plug 'seblj/nvim-echo-diagnostics'
Plug 'williamboman/nvim-lsp-installer'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/cmp-path'
Plug 'hrsh7th/cmp-cmdline'
Plug 'David-Kunz/cmp-npm'
Plug 'andersevenrud/cmp-tmux'
Plug 'lukas-reineke/cmp-rg'
Plug 'hrsh7th/nvim-cmp'
" key config for selecting items
" https://github.com/hrsh7th/nvim-cmp/issues/916
" lsp snippets
Plug 'SirVer/ultisnips'
Plug 'quangnguyen30192/cmp-nvim-ultisnips'
" more cmp sources
" Plug 'davidsierradz/cmp-conventionalcommits'
" Plug 'dmitmel/cmp-cmdline-history'
" Plug 'kristijanhusak/vim-dadbod-completion
" Plug 'rcarriga/cmp-dap'
Plug 'onsails/lspkind-nvim'
Plug 'nvim-lua/lsp_extensions.nvim'
Plug 'glepnir/lspsaga.nvim' " or https://github.com/ray-x/navigator.lua?
" Plug 'kyazdani42/nvim-web-devicons'
" Plug 'folke/trouble.nvim'
Plug 'simrat39/symbols-outline.nvim'
Plug 'stevearc/aerial.nvim'
Plug 'liuchengxu/vista.vim'
Plug 'rmagatti/goto-preview'
Plug 'ii14/lsp-command'
Plug 'ray-x/lsp_signature.nvim'
Plug 'filipdutescu/renamer.nvim', { 'branch': 'master' }
Plug 'lukas-reineke/lsp-format.nvim'
" if i don't want to configure the LSP but test it
" Plug 'VonHeikemen/lsp-zero.nvim'
" https://github.com/jose-elias-alvarez/null-ls.nvim
" Plug 'jose-elias-alvarez/nvim-lsp-ts-utils'
" utils
Plug 'windwp/nvim-autopairs'
Plug 'windwp/nvim-ts-autotag'
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'rcarriga/nvim-notify'
Plug 'nvim-telescope/telescope.nvim'
Plug 'nvim-telescope/telescope-fzf-native.nvim', { 'do': 'make' }
Plug 'nvim-telescope/telescope-dap.nvim'
Plug 'pwntester/octo.nvim'
Plug 'nvim-telescope/telescope-node-modules.nvim'
Plug 'lewis6991/gitsigns.nvim'
Plug 'kyazdani42/nvim-tree.lua'
Plug 'folke/tokyonight.nvim'
" Plug 'EdenEast/nightfox.nvim'
" Plug 'andersevenrud/nordic.nvim' or different nord or nordfox?
Plug 'tami5/sqlite.lua'
Plug 'AckslD/nvim-neoclip.lua'
call plug#end()
colorscheme tokyonight
" rounded boarders on hover and signature help:
" vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" })
" vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = "rounded" })
" rounded boards for diagnostic popup
" 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 config = {
" -- disable virtual text
" virtual_text = false,
" -- show signs
" signs = { active = signs },
" update_in_insert = true,
" underline = true,
" severity_sort = true,
" float = {
" focusable = false,
" style = "minimal",
" border = "rounded",
" source = "always",
" header = "",
" prefix = "",
" },
" }
" vim.diagnostic.config(config)
"toggle LSP diagnostics in Neovim 0.7
"vim.g.diagnostics_active = true
" vim.keymap.set('n', '<leader>d', function()
" vim.g.diagnostics_active = not vim.g.diagnostics_active
" if vim.g.diagnostics_active then
" vim.diagnostic.show()
" else
" vim.diagnostic.hide()
" end
" end)