summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/plugins.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/plugins.lua')
-rwxr-xr-x.config/nvim/lua/plugins.lua107
1 files changed, 63 insertions, 44 deletions
diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua
index 24736eb..bb7a7b4 100755
--- a/.config/nvim/lua/plugins.lua
+++ b/.config/nvim/lua/plugins.lua
@@ -1,8 +1,4 @@
---[[
--- Plugins
---]]
-
--- Bootstrap for Paq
+-- bootstrap paq
local install_path = vim.fn.stdpath('data')..'/site/pack/paqs/start/paq-nvim'
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.fn.system({
@@ -13,34 +9,35 @@ if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.cmd 'packadd paq-nvim'
end
--- Enable Paq
+-- enable paq
vim.cmd 'packadd paq-nvim'
--- Plugin list
+-- plugins
require('paq') {
{'savq/paq-nvim'};
- -- lsp
+ -- treesiter / lsp
+ {'nvim-treesitter/playground'};
+ {'nvim-treesitter/nvim-treesitter-textobjects'};
{
'nvim-treesitter/nvim-treesitter',
- run=':TSUpdate'
+ run=vim.api.nvim_command(':silent! TSUpdate')
};
{
'neovim/nvim-lspconfig',
run='python3 -m pipx install python-lsp-server[all]'
};
- {
- 'numirias/semshi',
- run=':UpdateRemotePlugins'
- };
-- utils
{'folke/trouble.nvim'};
{'hrsh7th/nvim-compe'};
- -- org
- {'TimUntersberger/neogit'};
- {'kyazdani42/nvim-tree.lua'};
+ {'hrsh7th/cmp-nvim-lsp'};
+ {'hrsh7th/cmp-cmdline'};
+ {'hrsh7th/cmp-buffer'};
+ {'hrsh7th/cmp-path'};
+ {'hrsh7th/cmp-calc'};
+ {'hrsh7th/nvim-cmp'};
-- indent
{'lewis6991/gitsigns.nvim'};
@@ -51,7 +48,7 @@ require('paq') {
{'nvim-lua/plenary.nvim'};
}
--- Treesitter
+-- treesitter
local parser_configs = require('nvim-treesitter.parsers').get_parser_configs()
@@ -61,29 +58,40 @@ require('nvim-treesitter.configs').setup {
'verilog',
'kotlin'
},
- highlight = {
- enable = true,
- }
+ highlight = { enable = true },
+ incremental_selection = { enable = true },
+ textobjects = { enable = true }
}
-- completion
-require('compe').setup {
- enabled = true,
- source = {
- path = true;
- buffer = true;
- calc = true;
- nvim_lsp = true;
- nvim_lua = true;
- vsnip = true;
- ultisnips = true;
- luasnip = true;
- neorg = true;
- };
-}
+local cmp = require('cmp')
+
+cmp.setup({
+ mapping = {
+ ['<C-l>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
+ ['<C-j>'] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c' }),
+ ['<C-k>'] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c' }),
+ ['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
+ },
+ sources = cmp.config.sources({
+ { name = 'nvim_lsp' },
+ { name = 'cmdline' },
+ { name = 'path' },
+ { name = 'calc' }
+ },
+ {
+ { name = 'buffer' }
+ })
+})
+
+cmp.setup.cmdline('/', {
+ sources = {
+ { name = 'buffer' }
+ }
+})
--- LSP configuration
+-- lsp configuration
local lsputil = require('lspconfig/util')
local python_venv = require('utils').get_python_venv()
@@ -96,22 +104,23 @@ require('lspconfig').pylsp.setup{
}
require('lspconfig').clangd.setup{}
+require('lspconfig').elixirls.setup{ cmd = {'elixir-ls'} }
require('lspconfig').eslint.setup{}
require('lspconfig').terraformls.setup{}
-- org
require('trouble').setup{}
-require('neogit').setup{}
-- syntactic sugar
require('indent_guides').setup{
indent_enable=true;
exclude_filetypes={
- 'help',
'calendar',
- 'NvimTree'
+ 'gitcommit',
+ 'help',
+ 'NvimTree',
};
}
@@ -119,7 +128,15 @@ require('indent-o-matic').setup {
max_lines = 0,
standard_widths = { 2, 4, 8 },
- filetype_typescript = {
+ filetype_ = {
+ standard_widths = { 2, 4 },
+ },
+
+ filetype_css = {
+ max_lines = 4096,
+ },
+
+ filetype_scss = {
max_lines = 4096,
},
@@ -127,16 +144,18 @@ require('indent-o-matic').setup {
max_lines = 4096,
},
- filetype_ = {
- standard_widths = { 2, 4 },
+ filetype_json = {
+ max_lines = 4096,
},
-}
-vim.g['semshi#update_delay_factor'] = 0.0001
+ filetype_typescript = {
+ max_lines = 4096,
+ },
+}
require('gitsigns').setup{
signs = {
- add = {hl = 'GitSignsAdd' , text = '▍', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
+ add = {hl = 'GitSignsAdd', text = '▍', numhl='GitSignsAddNr', linehl='GitSignsAddLn'},
change = {hl = 'GitSignsChange', text = '▍', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
delete = {hl = 'GitSignsDelete', text = '▍', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
topdelete = {hl = 'GitSignsDelete', text = '▍', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
remember that computers suck.