Skip to content

Commit

Permalink
initial lazyvim config
Browse files Browse the repository at this point in the history
  • Loading branch information
roeybenarieh authored Dec 9, 2023
2 parents c3d7f6e + 11d0b63 commit 9e0263e
Show file tree
Hide file tree
Showing 22 changed files with 1,184 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ debug
foo.*
*.log
data

# files created after running lazyvim
lazyvim.json
lazy-lock.json
# folder with spelling information
spell
49 changes: 46 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,47 @@
# 💤 LazyVim
# 💤 RoeyLazyVim

A starter template for [LazyVim](https://github.com/LazyVim/LazyVim).
Refer to the [documentation](https://lazyvim.github.io/installation) to get started.
Refer to LazyVim [documentation](https://lazyvim.github.io/installation). <br>
If You **REALLY** insist, you are welcome to browse Neovim [documentation](https://neovim.io/doc/user/) as well.

## what the f**ck is this repo about?

You probably used vscode/pycharm, and you are asking yourself what is the point of life? Why am I being drag down by this IDE 😞 <br>

Say hello to RoeyLazyVim! The only IDE that doesn't make you shoot yourself in the foot while you're using it. It has everything you used to and even more! <br>

Already have some experience with vi/vim? Great! This IDE is just for you!
## I'm stack, what should I do?
If you want to do anything, there is a good chance it's already supported by the IDE. <br>
A few tricks to find staff you want to do:

- type \<leader>sk (\<leader> is the space key), this will give you a interface to search for keymaps.
- type :h followed by the plugin name, this will open the plugin's documentation.
- search online, there is a large Neovim community at you command!
- read the LazyVim documentation given above, it might help you understand if what you want already exists, and if not how to add it (and create a PR😊)

## Good places for searching plugins
[neovimcraft](neovimcraft.com),
[awesome-neovim](https://github.com/rockerBOO/awesome-neovim),
[github](https://github.com)


## TODO
- make key maps for navigating in insert mode
- make more key maps for gitsigns
- make jbyuki/one-small-step-for-vimkind work
- undo file tree changes like deleting, moving, renaming files.(maybe venv-local-history)
- install plugins: LLM capability, gitlab integrations, overseer.nvim
- handle big files
- keymap for opening showing deleted files from mini.files
- allow NeoTree to delete files(and move them to the trash)
- make NeoTest find test files from the project's root path(not only if it's open in buffer)
- enable formatting of json (and json5) files
- possible plugins to install:
- overseer.nvim
- tmux.nvim
- mini.visits
- color themes: vscode.nvim
- telescope-dapzzzz
- vim-local-history
- AI intellisense, options: ollama.nvim, llm.nvim, ChatGPT.nvim
- goneovim
12 changes: 12 additions & 0 deletions lua/config/keymaps.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here

local map = vim.keymap.set
local write_err_to_user = vim.api.nvim_err_writeln

-- increase/decrease text font size
map("n", "<C-S-=>", function()
write_err_to_user("Increase text size by pressing Ctrl + Shift + =")
end, { desc = "increase text/font size" })

map("n", "<C-->", function()
write_err_to_user("decrease text size by pressing Ctrl + -")
end, { desc = "decrease text/font size" })
52 changes: 49 additions & 3 deletions lua/config/lazy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,56 @@ require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },

-- ui staff
{ import = "lazyvim.plugins.extras.ui.edgy" }, -- predefined windows layout

-- import any extras modules here
-- { import = "lazyvim.plugins.extras.lang.typescript" },
-- { import = "lazyvim.plugins.extras.lang.json" },
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
{ import = "lazyvim.plugins.extras.coding.codeium" }, -- AI autocompletion
{ import = "lazyvim.plugins.extras.coding.yanky" }, -- imporoved yank and put functionalities
{ import = "lazyvim.plugins.extras.editor.aerial" }, -- Neovim plugin for a code outline window
{ import = "lazyvim.plugins.extras.editor.leap" }, -- jump to words in the document
{ import = "lazyvim.plugins.extras.editor.navic" }, -- Simple winbar/statusline plugin that shows your current code context
{ import = "lazyvim.plugins.extras.editor.mini-files" }, -- Navigate and manipulate file system

-- dap
{ import = "lazyvim.plugins.extras.dap.core" }, -- dap capabilities

-- formatting
{ import = "lazyvim.plugins.extras.formatting.prettier" }, -- Prettier formmatter

--linting
{ import = "lazyvim.plugins.extras.linting.eslint" }, -- javascript static linting

-- highliting
{ import = "lazyvim.plugins.extras.lang.python-semshi" }, -- syntax highliting for python
{ import = "lazyvim.plugins.extras.util.mini-hipatterns" }, -- common highliting solutions

-- none ls
{ import = "lazyvim.plugins.extras.lsp.none-ls" },

--testing framework (testing runners are needed for each language)
{ import = "lazyvim.plugins.extras.test.core" },

--utils
{ import = "lazyvim.plugins.extras.util.dot" }, -- hyperland parser (https://github.com/hyprwm/Hyprland)
{ import = "lazyvim.plugins.extras.util.project" }, -- The superior project management solution for neovim.

-- LSP
{ import = "lazyvim.plugins.extras.lang.python" },
{ import = "lazyvim.plugins.extras.lang.go" },
{ import = "lazyvim.plugins.extras.lang.java" },
{ import = "lazyvim.plugins.extras.lang.docker" },
{ import = "lazyvim.plugins.extras.lang.json" },
{ import = "lazyvim.plugins.extras.lang.yaml" },
{ import = "lazyvim.plugins.extras.lang.markdown" },

{ import = "lazyvim.plugins.extras.lang.rust" },
{ import = "lazyvim.plugins.extras.lang.tailwind" },
{ import = "lazyvim.plugins.extras.lang.terraform" },
{ import = "lazyvim.plugins.extras.lang.typescript" },
{ import = "lazyvim.plugins.extras.dap.nlua" },

-- import/override with your plugins
{ import = "plugins" },
},
Expand Down
20 changes: 20 additions & 0 deletions lua/plugins/binary-swap.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
return {
"Wansmer/binary-swap.nvim",
config = true,
keys = {
{
"<leader>cbs",
function()
require("binary-swap").swap_operands()
end,
"switch operands(x>y=>y>x)",
},
{
"<leader>cbS",
function()
require("binary-swap").swap_operands_with_operator()
end,
"switch operands & operator(x>y=>y<x)",
},
},
}
54 changes: 54 additions & 0 deletions lua/plugins/breakpoints.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
local keymap = vim.api.nvim_set_keymap
return {
"Weissle/persistent-breakpoints.nvim",
config = function()
require("persistent-breakpoints").setup({
load_breakpoints_event = { "BufReadPost" },
})

keymap(
"n",
"<leader>db",
"<cmd>lua require('persistent-breakpoints.api').toggle_breakpoint()<cr>",
{ noremap = true, silent = true, desc = "Toggle Breakpoint" }
)
keymap(
"n",
"<leader>dB",
[[:lua require("persistent-breakpoints.api").set_conditional_breakpoint()<CR>]],
{ noremap = true, silent = true, desc = "Breakpoint Condition" }
)
keymap(
"n",
"<leader>dbc",
[[:lua require("persistent-breakpoints.api").clear_all_breakpoints()<CR>]],
{ noremap = true, silent = true, desc = "Clear Breakpoints" }
)
end,
-- neither the normal 'keys = ...' works
-- keys = function()
-- return {
-- {
-- "<leader>db",
-- function()
-- require("persistent-breakpoints.api").toggle_breakpoint()
-- end,
-- "TToggle Breakpoint",
-- },
-- {
-- "<leader>dB",
-- function()
-- require("persistent-breakpoints.api").set_conditional_breakpoint()
-- end,
-- "BBreakpoint Condition",
-- },
-- {
-- "<leader>dbc",
-- function()
-- require("persistent-breakpoints.api").clear_all_breakpoints()
-- end,
-- "CClear BreakPoints",
-- },
-- }
-- end,
}
12 changes: 12 additions & 0 deletions lua/plugins/colorscheme.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
return {
-- add gruvbox
{ "ellisonleao/gruvbox.nvim" },

-- Configure LazyVim to load gruvbox
{
"LazyVim/LazyVim",
opts = {
colorscheme = "gruvbox",
},
}
}
58 changes: 58 additions & 0 deletions lua/plugins/config/scratch_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"filetype_details": {
"go": {
"filename": "main",
"cursor": { "location": [4, 2], "insert_mode": true },
"requireDir": true,
"content": ["package main", "", "func main() {", " ", "}"]
},
"json": [],
"gp.md": {
"cursor": { "location": [12, 2], "insert_mode": true },
"content": [
"# topic: ?",
"",
"- model: {\"top_p\":1,\"temperature\":0.7,\"model\":\"gpt-3.5-turbo-16k\"}",
"- file: placeholder",
"- role: You are a general AI assistant.",
"",
"Write your queries after 🗨:. Run :GpChatRespond to generate response.",
"",
"---",
"",
"🗨:",
""
]
},
"py": {
"cursor": { "location": [4, 5], "insert_mode": true },
"content": [
"",
"",
"def main():",
" ",
"",
"if __name__ == '__main__':",
" main()",
" # best f*cking scratch file ever"
]
},
"yaml": [],
"k8s.yaml": { "subdir": "learn-k8s" }
},
"filetypes": ["json", "lua", "js", "sh", "sql"],
"localKeys": [
{
"filenameContains": ["gp"],
"LocalKeys": [
{
"cmd": "<CMD>GpResponse<CR>",
"modes": ["n", "i", "v"],
"key": "<C-k>k"
}
]
}
],
"scratch_file_dir": "/home/roey/.cache/nvim/scratch.nvim",
"window_cmd": "edit"
}
14 changes: 14 additions & 0 deletions lua/plugins/gitblame.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
return {
"f-person/git-blame.nvim",
keys = {
{
"<leader>go",
"<cmd> :GitBlameOpenFileURL <CR>",
desc = "open in browser remote repo (github/gitlab)",
},
},
opts = {
enabled = true, -- this plugin is enabled only for the 'GitBlameOpenFileURL' keymap
message_template = nil, -- show nothing in the git blame line
},
}
68 changes: 68 additions & 0 deletions lua/plugins/github.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
local github_key_maps = function()
local wk = require("which-key")
wk.register({
g = {
h = {
name = "+Github",
c = {
name = "+Commits",
c = { "<cmd>GHCloseCommit<cr>", "Close" },
e = { "<cmd>GHExpandCommit<cr>", "Expand" },
o = { "<cmd>GHOpenToCommit<cr>", "Open To" },
p = { "<cmd>GHPopOutCommit<cr>", "Pop Out" },
z = { "<cmd>GHCollapseCommit<cr>", "Collapse" },
},
i = {
name = "+Issues",
p = { "<cmd>GHPreviewIssue<cr>", "Preview" },
},
l = {
name = "+Litee",
t = { "<cmd>LTPanel<cr>", "Toggle Panel" },
},
r = {
name = "+Review",
b = { "<cmd>GHStartReview<cr>", "Begin" },
c = { "<cmd>GHCloseReview<cr>", "Close" },
d = { "<cmd>GHDeleteReview<cr>", "Delete" },
e = { "<cmd>GHExpandReview<cr>", "Expand" },
s = { "<cmd>GHSubmitReview<cr>", "Submit" },
z = { "<cmd>GHCollapseReview<cr>", "Collapse" },
},
p = {
name = "+Pull Request",
c = { "<cmd>GHClosePR<cr>", "Close" },
d = { "<cmd>GHPRDetails<cr>", "Details" },
e = { "<cmd>GHExpandPR<cr>", "Expand" },
o = { "<cmd>GHOpenPR<cr>", "Open" },
p = { "<cmd>GHPopOutPR<cr>", "PopOut" },
r = { "<cmd>GHRefreshPR<cr>", "Refresh" },
t = { "<cmd>GHOpenToPR<cr>", "Open To" },
z = { "<cmd>GHCollapsePR<cr>", "Collapse" },
},
t = {
name = "+Threads",
c = { "<cmd>GHCreateThread<cr>", "Create" },
n = { "<cmd>GHNextThread<cr>", "Next" },
t = { "<cmd>GHToggleThread<cr>", "Toggle" },
},
},
},
}, { prefix = "<leader>" })
end

return {
"ldelossa/gh.nvim",
dependencies = {
{
"ldelossa/litee.nvim",
config = function()
require("litee.lib").setup()
end,
},
},
config = function()
require("litee.gh").setup()
github_key_maps()
end,
}
14 changes: 14 additions & 0 deletions lua/plugins/gitignore_utils.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
return {
"wintermute-cell/gitignore.nvim",
dependencies = "nvim-telescope/telescope.nvim", -- optional: for multi-select
keys = {
{
"<leader>gi",
function()
local cur_directory = vim.fn.getcwd()
require("gitignore").generate(cur_directory)
end,
desc = "Create gitignore file",
},
},
}
Loading

0 comments on commit 9e0263e

Please sign in to comment.