-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
174 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
require('plugins') | ||
|
||
require('general.sets') | ||
require('general.netrw') | ||
require('general.mappings') | ||
require('general.colors') | ||
|
||
require('plugins/airline') | ||
require('plugins/treesitter') | ||
require('plugins/lsp') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
vim.cmd('colorscheme dracula') | ||
vim.g.dracula_colorterm = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
local map = vim.api.nvim_set_keymap | ||
local globals = vim.g | ||
|
||
-- map the leader key | ||
map('n', '<Space>', '', {}) | ||
globals.mapleader = ' ' | ||
|
||
options = { noremap = true } | ||
map('n', '<M-j>', ':nohlsearch<cr>', options) | ||
|
||
-- alt + hjkl to resize windows in normal mode | ||
map('n', '<M-h>', ':vertical resize -2<CR>', options) | ||
map('n', '<M-j>', ':resize -2<CR>', options) | ||
map('n', '<M-k>', ':resize +2<CR>', options) | ||
map('n', '<M-l>', ':vertical resize +2<CR>', options) | ||
|
||
-- ctrl + hjkl to move between windows in normal mode | ||
map('n', '<C-h>', '<C-w>h', options) | ||
map('n', '<C-j>', '<C-w>j', options) | ||
map('n', '<C-k>', '<C-w>k', options) | ||
map('n', '<C-l>', '<C-w>l', options) | ||
|
||
-- Telescope command-line sugar | ||
map('n', '<leader>ff', '<cmd>Telescope find_files<CR>', options) | ||
map('n', '<leader>fg', '<cmd>Telescope live_grep<CR>', options) | ||
map('n', '<leader>fb', '<cmd>Telescope buffers<CR>', options) | ||
map('n', '<leader>fh', '<cmd>Telescope help_tags<CR>', options) | ||
|
||
-- Open netrw | ||
map('n', '<leader>pv', ':Vexplore<CR>', options) | ||
|
||
|
||
-- [jk | kl] instead of ESC in insert mode | ||
map('i', 'jk' , '<ESC>', options) | ||
map('i', 'kj' , '<ESC>', options) | ||
|
||
-- Don't use arrow keys in insert mode | ||
map('i', '<up>', '<nop>', options) | ||
map('i', '<down>', '<nop>', options) | ||
map('i', '<left>', '<nop>', options) | ||
map('i', '<right>', '<nop>', options) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
vim.g.netrw_browse_split = 0 | ||
vim.g.netrw_fastbrowse = 0 | ||
vim.g.netrw_banner = 0 | ||
vim.g.netrw_winsize = 25 | ||
vim.g.netrw_liststyle = 3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
local o = vim.o | ||
local wo = vim.wo | ||
local bo = vim.bo | ||
|
||
-- global options | ||
o.splitbelow = true | ||
o.splitright = true | ||
o.guicursor = '' | ||
o.termguicolors = true -- icons are not displayed with the correct colors | ||
o.showmode = false | ||
o.incsearch = true | ||
o.hlsearch = false | ||
o.hidden = true | ||
o.scrolloff=8 | ||
o.completeopt="menuone,noinsert,noselect" | ||
-- Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable delays and poor user experience. | ||
o.updatetime = 50 | ||
|
||
-- buffer-local options | ||
bo.expandtab = true | ||
bo.smartindent = true | ||
bo.tabstop = 4 | ||
bo.softtabstop = 4 | ||
bo.shiftwidth = 4 | ||
|
||
-- window-local options | ||
wo.wrap = false | ||
wo.relativenumber = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
vim.g.airline_theme='dracula' | ||
vim.g.airline_powerline_fonts = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
local cmd = vim.cmd | ||
cmd 'packadd paq-nvim' | ||
local paq = require('paq-nvim').paq | ||
|
||
paq{'savq/paq-nvim', opt=true} | ||
paq { 'dracula/vim', as = 'dracula' } | ||
paq { 'nvim-lua/plenary.nvim' } | ||
paq { 'nvim-lua/popup.nvim' } | ||
paq { 'nvim-telescope/telescope.nvim' } | ||
paq { 'nvim-treesitter/nvim-treesitter' } | ||
paq { 'vim-airline/vim-airline' } | ||
paq { 'vim-airline/vim-airline-themes' } | ||
paq { 'tpope/vim-fugitive' } | ||
paq { 'kyazdani42/nvim-web-devicons' } | ||
paq { 'neovim/nvim-lspconfig' } | ||
paq { 'kabouzeid/nvim-lspinstall' } | ||
paq { 'nvim-lua/completion-nvim' } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
local on_attach = require'completion'.on_attach | ||
|
||
-- config that activates keymaps and enables snippet support | ||
local function make_config() | ||
local capabilities = vim.lsp.protocol.make_client_capabilities() | ||
capabilities.textDocument.completion.completionItem.snippetSupport = true | ||
return { | ||
capabilities = capabilities, | ||
on_attach = on_attach, | ||
} | ||
end | ||
|
||
-- lsp-install | ||
local function setup_servers() | ||
require'lspinstall'.setup() | ||
local servers = require'lspinstall'.installed_servers() | ||
local config = make_config() | ||
for _, server in pairs(servers) do | ||
require'lspconfig'[server].setup(config) | ||
end | ||
end | ||
|
||
setup_servers() | ||
|
||
-- Automatically reload after `:LspInstall <server>` so we don't have to restart neovim | ||
require'lspinstall'.post_install_hook = function () | ||
setup_servers() -- reload installed servers | ||
vim.cmd("bufdo e") -- this triggers the FileType autocmd that starts the server | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
require('nvim-treesitter.configs').setup { | ||
ensure_installed = "all", -- one of "all", "maintained" (parsers with maintainers), or a list of languages | ||
ignore_install = { "haskell" }, -- List of parsers to ignore installing | ||
highlight = { | ||
enable = true, -- false will disable the whole extension | ||
}, | ||
incremental_selection = { | ||
enable = true, -- false will disable the whole extension | ||
}, | ||
ident = { | ||
enable = true, -- false will disable the whole extension | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters