1 local map = vim.api.nvim_set_keymap
2 local opts = { noremap=true, silent=true }
6 vim.opt.undofile = true
8 map('', 'Q', '<nop>', opts)
11 vim.g.polyglot_disabled = {'sensible'}
14 local install_path = vim.fn.stdpath('data') .. '/site/pack/paqs/start/paq-nvim'
16 if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
17 vim.fn.system({'git', 'clone', '--depth=1',
18 'https://github.com/savq/paq-nvim.git', install_path})
22 'ap/vim-css-color'; -- Highlight css colors
23 'ctrlpvim/ctrlp.vim'; -- Fuzzy file finding
24 'editorconfig/editorconfig-vim'; -- Follow editorconfig
25 'folke/lsp-colors.nvim'; -- Add LSP colors to any theme
26 'godlygeek/tabular'; -- Line things up
27 'lifepillar/vim-mucomplete'; -- Simple autocompletion
28 'meain/hima-vim'; -- Nice color scheme
29 'neovim/nvim-lspconfig'; -- LSP configurations
30 'ntpeters/vim-better-whitespace'; -- Highlight and strip whitespace
31 'savq/paq-nvim'; -- paq manages itself
32 'sheerun/vim-polyglot'; -- Language pack
33 'tpope/vim-commentary'; -- Easily comment
34 'tpope/vim-rsi'; -- Readline bindings
35 'tpope/vim-sensible'; -- Sensible defaults
36 'tpope/vim-speeddating'; -- Modify dates with C-a, C-x
37 'tpope/vim-surround'; -- Easily modify surrounding chars
41 vim.opt.termguicolors = true
42 vim.g.colors_name = 'hima'
44 -- Easier split movement
45 map('n', '<C-h>', '<C-w><C-h>', opts)
46 map('n', '<C-j>', '<C-w><C-j>', opts)
47 map('n', '<C-k>', '<C-w><C-k>', opts)
48 map('n', '<C-l>', '<C-w><C-l>', opts)
50 -- Clear search highlighting
51 map('n', '<C-c>', ':noh<CR>', opts)
54 vim.opt.completeopt = vim.opt.completeopt + 'menuone'
55 vim.opt.completeopt = vim.opt.completeopt - 'preview'
56 vim.opt.shortmess = vim.opt.shortmess + 'c'
59 local lspconfig = require('lspconfig')
61 local on_attach = function(client, bufnr)
63 local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr,
65 local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr,
68 -- Use omnifunc for completion
69 buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
72 buf_set_keymap('n', 'gD',
73 '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
74 buf_set_keymap('n', 'gd',
75 '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
76 buf_set_keymap('n', 'gr',
77 '<cmd>lua vim.lsp.buf.references()<CR>', opts)
78 buf_set_keymap('n', 'K',
79 '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
80 buf_set_keymap('n', '<space>rn',
81 '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
82 buf_set_keymap('n', '[d',
83 '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
84 buf_set_keymap('n', ']d',
85 '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
86 buf_set_keymap('n', '<space>e',
87 '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
95 for _, server in ipairs(servers) do
96 lspconfig[server].setup {on_attach = on_attach}
99 vim.opt.signcolumn = 'no'
101 -- Jump to files with gf
102 vim.opt.hidden = true
103 vim.opt.path = vim.opt.path + '**'