forked from cpow/cpow-dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 5cd67e6
Showing
11 changed files
with
129 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
require("core.keymaps") | ||
require("core.plugins") | ||
require("core.plugin_config") |
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,17 @@ | ||
vim.g.mapleader = ' ' | ||
vim.g.maplocalleader = ' ' | ||
|
||
vim.opt.backspace = '2' | ||
vim.opt.showcmd = true | ||
vim.opt.laststatus = 2 | ||
vim.opt.autowrite = true | ||
vim.opt.cursorline = true | ||
vim.opt.autoread = true | ||
|
||
-- use spaces for tabs and whatnot | ||
vim.opt.tabstop = 2 | ||
vim.opt.shiftwidth = 2 | ||
vim.opt.shiftround = true | ||
vim.opt.expandtab = true | ||
|
||
vim.keymap.set('n', '<leader>h', ':nohlsearch<CR>') |
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.o.termguicolors = true | ||
vim.cmd [[ colorscheme gruvbox ]] |
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,7 @@ | ||
require("core.plugin_config.colorscheme") | ||
require("core.plugin_config.lualine") | ||
require("core.plugin_config.nvim-tree") | ||
require("core.plugin_config.treesitter") | ||
require("core.plugin_config.telescope") | ||
require("core.plugin_config.vim-test") | ||
require("core.plugin_config.lsp_config") |
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,22 @@ | ||
require("mason").setup() | ||
require("mason-lspconfig").setup({ | ||
ensure_installed = { "sumneko_lua", "solargraph" } | ||
}) | ||
|
||
local on_attach = function(_, _) | ||
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, {}) | ||
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, {}) | ||
|
||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {}) | ||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, {}) | ||
vim.keymap.set('n', 'gr', require('telescope.builtin').lsp_references, {}) | ||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, {}) | ||
end | ||
|
||
require("lspconfig").sumneko_lua.setup { | ||
on_attach = on_attach | ||
} | ||
|
||
require("lspconfig").solargraph.setup { | ||
on_attach = on_attach | ||
} |
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,14 @@ | ||
require('lualine').setup { | ||
options = { | ||
icons_enabled = true, | ||
theme = 'gruvbox', | ||
}, | ||
sections = { | ||
lualine_a = { | ||
{ | ||
'filename', | ||
path = 1, | ||
} | ||
} | ||
} | ||
} |
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.loaded_netrw = 1 | ||
vim.g.loaded_netrwPlugin = 1 | ||
|
||
require("nvim-tree").setup() | ||
|
||
vim.keymap.set('n', '<c-n>', ':NvimTreeFindFileToggle<CR>') |
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 @@ | ||
local builtin = require('telescope.builtin') | ||
|
||
vim.keymap.set('n', '<c-p>', builtin.find_files, {}) | ||
vim.keymap.set('n', '<Space><Space>', builtin.oldfiles, {}) | ||
vim.keymap.set('n', '<Space>fg', builtin.live_grep, {}) | ||
vim.keymap.set('n', '<Space>fh', builtin.help_tags, {}) |
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,11 @@ | ||
require'nvim-treesitter.configs'.setup { | ||
-- A list of parser names, or "all" | ||
ensure_installed = { "c", "lua", "rust", "ruby", "vim" }, | ||
|
||
-- Install parsers synchronously (only applied to `ensure_installed`) | ||
sync_install = false, | ||
auto_install = true, | ||
highlight = { | ||
enable = 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.keymap.set('n', '<leader>t', ':TestNearest<CR>') | ||
vim.keymap.set('n', '<leader>T', ':TestFile<CR>') |
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,39 @@ | ||
local ensure_packer = function() | ||
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 | ||
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) | ||
vim.cmd [[packadd packer.nvim]] | ||
return true | ||
end | ||
return false | ||
end | ||
|
||
local packer_bootstrap = ensure_packer() | ||
|
||
return require('packer').startup(function(use) | ||
use 'wbthomason/packer.nvim' | ||
use 'ellisonleao/gruvbox.nvim' | ||
use 'nvim-tree/nvim-tree.lua' | ||
use 'nvim-tree/nvim-web-devicons' | ||
use 'nvim-lualine/lualine.nvim' | ||
use 'nvim-treesitter/nvim-treesitter' | ||
use 'bluz71/vim-nightfly-colors' | ||
use 'vim-test/vim-test' | ||
use { | ||
"williamboman/mason.nvim", | ||
"williamboman/mason-lspconfig.nvim", | ||
"neovim/nvim-lspconfig", | ||
} | ||
use { | ||
'nvim-telescope/telescope.nvim', | ||
tag = '0.1.0', | ||
requires = { {'nvim-lua/plenary.nvim'} } | ||
} | ||
|
||
-- Automatically set up your configuration after cloning packer.nvim | ||
-- Put this at the end after all plugins | ||
if packer_bootstrap then | ||
require('packer').sync() | ||
end | ||
end) |