-
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
1 parent
6609a2f
commit 6c2813f
Showing
18 changed files
with
235 additions
and
54 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,9 @@ | ||
{ | ||
imports = [ | ||
./plugins | ||
]; | ||
|
||
programs.neovim = { | ||
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,4 @@ | ||
return function() | ||
vim.g.NERDTreeMinimalUI = 1 | ||
vim.keymap.set("n", "<Leader>n", "<CR>:NERDTree<CR>") | ||
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,59 @@ | ||
return function() | ||
-- Set up nvim-cmp. | ||
local cmp = require("cmp") | ||
local lspkind = require("lspkind") | ||
|
||
vim.opt.completeopt = { "menu", "menuone", "noselect" } | ||
|
||
cmp.setup { | ||
snippet = { | ||
-- REQUIRED - you must specify a snippet engine | ||
expand = function(args) | ||
require("luasnip").lsp_expand(args.body) | ||
end, | ||
}, | ||
window = { | ||
-- completion = cmp.config.window.bordered(), | ||
-- documentation = cmp.config.window.bordered(), | ||
}, | ||
mapping = cmp.mapping.preset.insert { | ||
["<C-b>"] = cmp.mapping.scroll_docs(-4), | ||
["<C-f>"] = cmp.mapping.scroll_docs(4), | ||
["<C-Space>"] = cmp.mapping.complete(), | ||
["<C-e>"] = cmp.mapping.abort(), | ||
["<CR>"] = cmp.mapping.confirm { select = true }, -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. | ||
}, | ||
formatting = { | ||
format = lspkind.cmp_format(), | ||
}, | ||
sources = cmp.config.sources { | ||
{ name = "nvim_lsp" }, | ||
{ name = "luasnip" }, -- For luasnip users. | ||
{ name = "buffer" }, | ||
{ name = "git" }, | ||
}, | ||
} | ||
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). | ||
cmp.setup.cmdline({ "/", "?" }, { | ||
mapping = cmp.mapping.preset.cmdline(), | ||
sources = { | ||
{ name = "buffer" }, | ||
}, | ||
}) | ||
|
||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). | ||
cmp.setup.cmdline(":", { | ||
mapping = cmp.mapping.preset.cmdline(), | ||
sources = cmp.config.sources({ | ||
{ name = "path" }, | ||
}, { | ||
{ name = "cmdline" }, | ||
}), | ||
}) | ||
|
||
-- Set up lspconfig. | ||
local capabilities = require("cmp_nvim_lsp").default_capabilities() | ||
require("lspconfig")["lua_ls"].setup { | ||
capabilities = capabilities, | ||
} | ||
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,7 @@ | ||
return function() | ||
local builtin = require("telescope.builtin") | ||
vim.keymap.set("n", "<leader>ff", builtin.find_files, {}) | ||
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {}) | ||
vim.keymap.set("n", "<leader>fr", builtin.lsp_references, {}) | ||
vim.keymap.set("n", "<leader>fs", builtin.lsp_symbols, {}) | ||
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,3 @@ | ||
return function() | ||
require("trouble").setup() | ||
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,45 @@ | ||
{ pkgs, ... }: | ||
{ | ||
programs.neovim.plugins = [ | ||
{ | ||
plugin = pkgs.vimPlugins.nvim-cmp; | ||
config = '' | ||
require("lz.n").load { | ||
"nvim-cmp", | ||
event = "InsertEnter", | ||
after = require("tomodachi94.plugins.nvim-cmp"), | ||
} | ||
''; | ||
type = "lua"; | ||
optional = true; | ||
} | ||
{ | ||
plugin = pkgs.vimPlugins.cmp-buffer; | ||
optional = true; | ||
} | ||
{ | ||
plugin = pkgs.vimPlugins.cmp-path; | ||
optional = true; | ||
} | ||
{ | ||
plugin = pkgs.vimPlugins.cmp-nvim-lsp; | ||
optional = true; | ||
} | ||
{ | ||
plugin = pkgs.vimPlugins.cmp-buffer; | ||
optional = true; | ||
} | ||
{ | ||
plugin = pkgs.vimPlugins.cmp_luasnip; | ||
optional = true; | ||
} | ||
{ | ||
plugin = pkgs.vimPlugins.cmp-git; | ||
optional = true; | ||
} | ||
{ | ||
plugin = pkgs.vimPlugins.lspkind-nvim; | ||
optional = 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,6 @@ | ||
{ pkgs, ... }: | ||
{ | ||
programs.neovim.plugins = [ | ||
pkgs.vimPlugins.lz-n | ||
]; | ||
} |
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 @@ | ||
{ pkgs, ... }: | ||
{ | ||
programs.neovim.plugins = [ | ||
{ | ||
plugin = pkgs.vimPlugins.nerdtree; | ||
config = '' | ||
require("lz.n").load { | ||
"nerdtree", | ||
cmd = { | ||
"NERDTree", | ||
"NERDTreeVCS", | ||
"NERDTreeFromBookmark", | ||
"NERDTreeToggle", | ||
"NERDTreeToggleVCS", | ||
"NERDTreeFocus", | ||
"NERDTreeMirror", | ||
"NERDTreeClose", | ||
"NERDTreeFind", | ||
"NERDTreeCWD", | ||
"NERDTreeRefreshRoot", | ||
}, | ||
after = require("tomodachi94.plugins.nerdtree"), | ||
} | ||
''; | ||
type = "lua"; | ||
optional = 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,29 @@ | ||
{ pkgs, ... }: | ||
{ | ||
programs.neovim.plugins = [ | ||
{ | ||
plugin = pkgs.vimPlugins.vim-fugitive; | ||
config = '' | ||
require("lz.n").load { | ||
"vim-fugitive", | ||
cmd = { | ||
"Gedit", | ||
"Gdiffsplit", | ||
"Gread", | ||
"Gwrite", | ||
"Ggrep", | ||
"Glgrep", | ||
"GMove", | ||
"GRename", | ||
"GDelete", | ||
"GBrowse", | ||
"G", | ||
"Git", | ||
}, | ||
} | ||
''; | ||
type = "lua"; | ||
optional = 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 @@ | ||
|
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 @@ | ||
|
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 @@ | ||
|
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 @@ | ||
|
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 @@ | ||
|
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 @@ | ||
|
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,37 @@ | ||
{ pkgs, tomolib, ... }: | ||
{ | ||
programs.neovim.plugins = [ | ||
{ | ||
plugin = pkgs.vimPlugins.telescope-nvim; | ||
config = '' | ||
require("lz.n").load { | ||
"telescope", | ||
cmd = "Telescope", | ||
} | ||
''; | ||
type = "lua"; | ||
optional = true; | ||
} | ||
{ | ||
plugin = pkgs.vimPlugins.trouble-nvim; | ||
config = '' | ||
require("lz.n").load { | ||
"trouble", | ||
cmd = { | ||
"Trouble", | ||
"TroubleClose", | ||
"TroubleToggle", | ||
"TroubleRefresh", | ||
}, | ||
after = function() | ||
require("trouble").setup() | ||
end, | ||
} | ||
''; | ||
type = "lua"; | ||
optional = 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 @@ | ||
|
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