summaryrefslogtreecommitdiff
path: root/nvim/lua/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'nvim/lua/plugins')
-rw-r--r--nvim/lua/plugins/init.lua75
-rw-r--r--nvim/lua/plugins/lualine.lua40
-rw-r--r--nvim/lua/plugins/telescope.lua7
-rw-r--r--nvim/lua/plugins/tree.lua14
-rw-r--r--nvim/lua/plugins/treesitter.lua5
5 files changed, 141 insertions, 0 deletions
diff --git a/nvim/lua/plugins/init.lua b/nvim/lua/plugins/init.lua
new file mode 100644
index 0000000..6308262
--- /dev/null
+++ b/nvim/lua/plugins/init.lua
@@ -0,0 +1,75 @@
+local fn = vim.fn
+local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
+if fn.empty(fn.glob(install_path)) > 0 then
+ packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
+end
+
+return require('packer').startup(function(use)
+ use 'wbthomason/packer.nvim'
+ use 'nvim-lua/plenary.nvim'
+ use 'neovim/nvim-lspconfig'
+ use 'hrsh7th/cmp-nvim-lsp'
+ use 'hrsh7th/cmp-buffer'
+ use 'hrsh7th/cmp-path'
+ use 'hrsh7th/nvim-cmp'
+ use {
+ 'nvim-lualine/lualine.nvim',
+ config = function()
+ require 'plugins.lualine'
+ end
+ }
+
+ -- движок сниппетов
+ use {
+ 'L3MON4D3/LuaSnip',
+ after = 'friendly-snippets',
+ config = function()
+ require('luasnip/loaders/from_vscode').load({
+ paths = { '~/.local/share/nvim/site/pack/packer/start/friendly-snippets' }
+ })
+ end
+ }
+
+ -- автодополнения для сниппетов
+ use 'saadparwaiz1/cmp_luasnip'
+
+ -- набор готовых сниппетов для всех языков, включая go
+ use 'rafamadriz/friendly-snippets'
+
+ -- плагин для простого комментирования кода
+ use {
+ 'numToStr/Comment.nvim',
+ config = function()
+ require('Comment').setup()
+ end
+ }
+ use {
+ 'nvim-treesitter/nvim-treesitter',
+ run = ':TSUpdate',
+ config = function()
+ require 'plugins.treesitter'
+ end
+ }
+ use {
+ 'nvim-telescope/telescope.nvim',
+ config = function()
+ require 'plugins.telescope'
+ end
+ }
+ use {
+ 'olexsmir/gopher.nvim',
+ config = function()
+ -- require 'plugins.gopher'
+ end
+ }
+ use {
+ 'nvim-tree/nvim-tree.lua',
+ config = function()
+ require 'plugins.tree'
+ end
+ }
+ use 'nvim-tree/nvim-web-devicons'
+ if packer_bootstrap then
+ require('packer').sync()
+ end
+end)
diff --git a/nvim/lua/plugins/lualine.lua b/nvim/lua/plugins/lualine.lua
new file mode 100644
index 0000000..891b392
--- /dev/null
+++ b/nvim/lua/plugins/lualine.lua
@@ -0,0 +1,40 @@
+require('lualine').setup {
+ options = {
+ icons_enabled = true,
+ theme = 'auto',
+ component_separators = { left = '', right = ''},
+ section_separators = { left = '', right = ''},
+ disabled_filetypes = {
+ statusline = {},
+ winbar = {},
+ },
+ ignore_focus = {},
+ always_divide_middle = true,
+ globalstatus = false,
+ refresh = {
+ statusline = 1000,
+ tabline = 1000,
+ winbar = 1000,
+ }
+ },
+ sections = {
+ lualine_a = {'mode'},
+ lualine_b = {'branch', 'diff', 'diagnostics'},
+ lualine_c = {'filename'},
+ lualine_x = {'encoding', 'fileformat', 'filetype'},
+ lualine_y = {'progress'},
+ lualine_z = {'location'}
+ },
+ inactive_sections = {
+ lualine_a = {},
+ lualine_b = {},
+ lualine_c = {'filename'},
+ lualine_x = {'location'},
+ lualine_y = {},
+ lualine_z = {}
+ },
+ tabline = {},
+ winbar = {},
+ inactive_winbar = {},
+ extensions = {}
+}
diff --git a/nvim/lua/plugins/telescope.lua b/nvim/lua/plugins/telescope.lua
new file mode 100644
index 0000000..44b1869
--- /dev/null
+++ b/nvim/lua/plugins/telescope.lua
@@ -0,0 +1,7 @@
+require('telescope').setup{
+ pickers = {
+ buffers = {
+ initial_mode = 'normal'
+ }
+ }
+}
diff --git a/nvim/lua/plugins/tree.lua b/nvim/lua/plugins/tree.lua
new file mode 100644
index 0000000..86cc36c
--- /dev/null
+++ b/nvim/lua/plugins/tree.lua
@@ -0,0 +1,14 @@
+require("nvim-tree").setup({
+ sort = {
+ sorter = "case_sensitive",
+ },
+ view = {
+ width = 30,
+ },
+ renderer = {
+ group_empty = true,
+ },
+ filters = {
+ dotfiles = true,
+ },
+})
diff --git a/nvim/lua/plugins/treesitter.lua b/nvim/lua/plugins/treesitter.lua
new file mode 100644
index 0000000..ff02ec4
--- /dev/null
+++ b/nvim/lua/plugins/treesitter.lua
@@ -0,0 +1,5 @@
+require('nvim-treesitter.configs').setup{
+ ensure_installed = 'all',
+ ignore_install = { 'phpdoc' },
+ highlight = { enable = true }
+}