PageRenderTime 96ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/vim-new/nvim/lua/plugins.lua

https://github.com/Ricordel/config_files
Lua | 76 lines | 65 code | 6 blank | 5 comment | 0 complexity | 63d3d46f5a99da565808fb193851d6c7 MD5 | raw file
  1. return require('packer').startup(function()
  2. use 'wbthomason/packer.nvim' -- so packer can update itself
  3. use { -- nice interface for LSP functions (among other things)
  4. 'nvim-telescope/telescope.nvim',
  5. requires = { {'nvim-lua/plenary.nvim'},
  6. {'BurntSushi/ripgrep'}}
  7. }
  8. use 'neovim/nvim-lspconfig' -- native LSP support
  9. use 'hrsh7th/nvim-cmp' -- autocompletion framework
  10. use 'hrsh7th/cmp-nvim-lsp' -- LSP autocompletion provider
  11. use 'hrsh7th/cmp-buffer' -- Buffer autocompletion provider
  12. use 'hrsh7th/cmp-path' -- Buffer autocompletion provider
  13. use 'scrooloose/nerdcommenter' -- Nerd commenter, to comment / uncomment code easily
  14. use 'scrooloose/nerdtree' -- A browsable tree view of the working directory
  15. use 'guns/xterm-color-table.vim' -- To have a view of vim 256 colors
  16. use 'vim-airline/vim-airline' -- Airline, a better status line
  17. use 'tpope/vim-markdown' -- Markdown files
  18. use 'embear/vim-localvimrc' -- local vimrc .lvimrc
  19. use 'bronson/vim-trailing-whitespace' -- trailing whitespace highlight and remove
  20. use 'Yggdroot/indentLine' -- show indentation
  21. use 'wgwoods/vim-systemd-syntax' -- systemd syntax
  22. use 'cespare/vim-toml' -- toml syntax hithlighting
  23. use 'ray-x/lsp_signature.nvim' -- show type signatures when typing
  24. use 'tpope/vim-fugitive' -- feature rich git integration
  25. use 'simrat39/rust-tools.nvim' -- more Rust niceness
  26. use {
  27. 'lewis6991/gitsigns.nvim',
  28. requires = {
  29. 'nvim-lua/plenary.nvim'
  30. },
  31. -- tag = 'release' -- To use the latest release
  32. }
  33. -- autocomplete config
  34. local cmp = require 'cmp'
  35. cmp.setup {
  36. mapping = {
  37. ['<Tab>'] = cmp.mapping.select_next_item(),
  38. ['<S-Tab>'] = cmp.mapping.select_prev_item(),
  39. ['<CR>'] = cmp.mapping.confirm({
  40. behavior = cmp.ConfirmBehavior.Replace,
  41. select = false,
  42. })
  43. },
  44. sources = {
  45. { name = 'nvim_lsp' },
  46. { name = 'buffer' },
  47. { name = 'path' },
  48. }
  49. }
  50. -- omnisharp lsp config
  51. require'lspconfig'.omnisharp.setup {
  52. capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()),
  53. on_attach = function(_, bufnr)
  54. vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
  55. require "lsp_signature".on_attach({
  56. bind = true, -- This is mandatory, otherwise border config won't get registered.
  57. handler_opts = {
  58. border = "single"
  59. }
  60. }, bufnr)
  61. end,
  62. flags = {
  63. debounce_text_changes = 150,
  64. },
  65. --cmd = { "/home/yoann/bin/omnisharp-roslyn/run", "--languageserver" , "--hostPID", tostring(pid) },
  66. cmd = { "/home/yoann/bin/omnisharp-roslyn/OmniSharp", "--languageserver" , "--hostPID", tostring(pid) },
  67. }
  68. -- rust lsp config, mostly automated by rust-tools
  69. require('rust-tools').setup({})
  70. end)