Compare commits

..

101 commits

Author SHA1 Message Date
Andy Teijelo
fc85b42adb lazy lock change neo-tree to branch main ? 2024-11-14 09:59:19 -05:00
ddd85566b2 update lazy-lock 2024-11-14 09:57:58 -05:00
Andy Teijelo
43d21bb1a3 enable nvim-notify 2024-11-14 09:55:36 -05:00
Andy Teijelo
56462aca75 fix wezterm mux sync issues 2024-11-14 09:55:19 -05:00
7f336f5055 sync, disable manual rust-analyzer setup, use rustaceanvim default 2024-11-14 09:53:00 -05:00
Andy Teijelo
8d667fa864 filter out ts-ls debug errors; cmd mode in neotree input popup 2024-11-11 14:07:05 -05:00
d1ce6eeb3d update dismiss notifications to work with Snacks 2024-11-08 17:27:06 -05:00
14a69223ed remove Esc to close notifications 2024-11-08 17:03:43 -05:00
bb7147e88b fixing notifications after v13 2024-11-08 16:59:46 -05:00
0368d28648 enable helm extra 2024-09-23 16:01:38 -04:00
Andy Teijelo
f4053f764f sync 2024-09-23 16:01:31 -04:00
Andy Teijelo
3ad4b16d66 dismiss notifications with Esc 2024-09-23 15:59:13 -04:00
Andy Teijelo
84874e4767 improve GoToBuffer keymaps 2024-09-23 15:37:07 -04:00
9f54144f43 broken which-key 2024-07-18 16:49:31 -04:00
Andy Teijelo
11dcc20d71 switch from vtsls to tsserver 2024-07-16 12:07:09 -04:00
Andy Teijelo
73684f4c7f remove commented out lsp settings 2024-07-16 11:59:51 -04:00
Andy Teijelo
8464c542c4 Sync 2024-07-14 12:44:45 -04:00
Andy Teijelo
77f02a2178 add borders to diagnostics, filter out vtsls inlayHint errors 2024-07-14 12:44:20 -04:00
c6eb8cf13d add ansible extra 2024-07-13 21:21:28 -04:00
ac3ce767cc which border config update 2024-07-13 21:21:07 -04:00
0636a4b90a give noice another try 2024-07-07 16:32:19 -04:00
Andy Teijelo
2ffa521e84 fix osc52 2024-06-22 14:26:02 -04:00
Andy Teijelo
8a950deee0 avoid confusing <Esc> + key with <Alt> + key 2024-06-19 16:46:43 -04:00
Andy Teijelo
95be988ec4 dap shortcuts 2024-06-19 16:46:33 -04:00
Andy Teijelo
dd079bb9f9 add repolink and osc52 support just for copying 2024-06-19 16:45:33 -04:00
Andy Teijelo
fde7281e01 disable image, tweak indent lines 2024-06-19 16:44:47 -04:00
c610cc2da5 update to neovim 0.10 2024-05-21 23:51:37 -04:00
Andy Teijelo
1e8399ab51 fix mini-indentscope and indent-blankline 2024-05-21 23:23:46 -04:00
5533ebc8df show images 2024-05-19 01:01:34 -04:00
Andy Teijelo
739ec568b5 update 2024-05-09 12:02:30 -04:00
8b35d2ebe3 enable exrc 2024-05-09 11:57:14 -04:00
83e5f4aa72 lock file update 2024-05-06 11:03:29 -04:00
2241921f6f set vim-visual-multi color theme 2024-05-06 11:03:04 -04:00
Andy Teijelo
4d679834ff add treesitter foldexpr 2024-05-06 11:02:03 -04:00
Andy Teijelo
7b31e0ad53 sync 2024-02-15 13:49:51 -05:00
43c0c9fb75 tried noice again, remembered why I disabled it 2024-02-05 14:21:27 -05:00
Andy Teijelo
3557250d95 reenable zip plugin 2024-02-05 08:52:48 -05:00
d4f71ddb0f More Tab key fixes 2023-12-18 09:33:02 -05:00
d2a3415639 fighting LuaSnip 2023-12-08 12:55:38 -05:00
1ea88ca014 update, disable dashboard, fix <leader>n 2023-11-22 20:10:00 -05:00
Andy Teijelo
f5ec64c2fd fixed indent-blankline opts 2023-11-01 14:18:00 -04:00
125d86d70c more stuff 2023-11-01 14:13:59 -04:00
9c022e2065 stuff 2023-11-01 14:13:31 -04:00
304d3dbf31 updates 2023-11-01 14:13:09 -04:00
Andy Teijelo
4d154c4a84 indent blankline 2023-07-31 19:26:01 -04:00
Andy Teijelo
d2bfb1bcac disable flash, hotkeys tweaks 2023-07-17 11:08:44 -04:00
Andy Teijelo
cdc212db43 Enable dressing 2023-06-24 15:56:19 -04:00
Andy Teijelo
00d661d16e Use dressing for vim.ui.input with modal editing 2023-06-20 15:19:30 -04:00
49d6cd7aa2 Set indent to 2 in html files 2023-06-18 12:59:59 -04:00
42a076b8a8 Adding clippy 2023-06-18 12:59:41 -04:00
87e9746745 delete commented out code 2023-06-18 12:47:26 -04:00
cd06d70003 Trying (and failing) to fix vim-visual-multi colors 2023-06-14 11:13:05 -04:00
Andy Teijelo
a7c5a393d7 More typescript tweaks 2023-06-12 16:41:51 -04:00
Andy Teijelo
638de16463 Add bbye 2023-06-12 13:18:08 -04:00
0ece95dc60 fix indent for lua files 2023-06-12 10:02:33 -04:00
b82a39b872 More tweaks 2023-06-12 09:07:22 -04:00
8a7d5a8927 Some cleanup 2023-06-09 20:53:37 -04:00
Andy Teijelo
b883b4be2c Add vim-visual-multi 2023-06-09 20:13:07 -04:00
Andy Teijelo
1800e5d2e1 Fix indent, remove yaml key order warning 2023-06-09 11:20:30 -04:00
Andy Teijelo
b286bcaa74 search visual selection 2023-06-09 08:10:32 -04:00
Andy Teijelo
6e103f4bff More updates 2023-06-08 16:38:02 -04:00
bd5bf2bfce A lot of changes 2023-06-08 14:34:13 -04:00
6493b784fb Set conceallevel to 0 in help files 2023-05-31 09:48:55 -04:00
49cbf0f241 Still trying to make LazyVim work for me 2023-05-31 09:37:18 -04:00
a1e95f462a wip 2023-05-25 21:01:38 -04:00
ef84dd7069 Still trying to get LazyVim to match basic-ide 2023-05-20 13:27:54 -04:00
2a9cc31e40 Updated plugins 2023-05-16 17:01:20 -04:00
26c3931937 wip 2023-03-14 20:52:03 -04:00
a707db0529 disable update notification 2023-03-14 20:27:41 -04:00
c1dbb28eac wip 2023-03-14 14:32:18 -04:00
51e79ef80d wip 2023-03-14 13:29:39 -04:00
b812bb555d making progress in lazyvim 2023-03-13 21:15:17 -04:00
40b335f69a Disable more plugins 2023-03-09 15:08:41 -05:00
4a54404954 disable some plugins 2023-03-09 12:43:06 -05:00
7ad1a4d995 Trying LazyVim 2023-03-08 14:51:50 -05:00
c9075e6d72 find files, sumneko deprecation, plugin updates 2023-03-07 00:19:45 -05:00
50afb12ae5 bunch of updates 2023-03-07 00:19:45 -05:00
Andy Teijelo
18e7b2b507 Bufferline keymap fixes 2023-03-07 00:17:48 -05:00
Andy Teijelo
9912570174 Add some Telescope shortcuts 2023-02-25 00:37:31 -05:00
Andy Teijelo
d4de554376 Many changes:
- disable project plugin
- try to fix <Tab> jumping all around
- don't paste with 'p' on Select mode (only on visual mode)
- map '-' to '/'
- don't override prettier config
2023-02-02 10:57:07 -05:00
76fed65fbb Make moving code require Alt+Shift.
This prevents an <Esc> quickly followed by <j> or <l> from moving
the current line.
2023-02-02 10:55:27 -05:00
aa149d21ef Don't pre-select 1st cmp suggestion by default
This prevents accidentally expanding a completion when trying
to start a newline.
2023-02-02 10:53:18 -05:00
8befcfc23b trying python's mason-nvim-dap 2022-12-12 04:29:48 -05:00
70c5ea6915 tweak TreesitterContext colors 2022-11-27 09:12:47 -05:00
ad0d5db776 tweaks to <leader>n and use clippy with rust 2022-11-22 10:05:16 -05:00
Andy Teijelo
e3bad09e9f Add keymap to clean screen
<leader>n to hide signcolumn, line numbers and virtual text
2022-11-10 12:02:57 -05:00
Andy Teijelo
eb0dd08f70 don't fail keymaps if plugins aren't installed 2022-11-10 11:01:12 -05:00
9bad8de707 missing file 2022-11-10 10:58:28 -05:00
ee5cd7628a disable treesitter for vim help 2022-11-10 10:51:11 -05:00
64a73e23b1 Fix colors of treesitter-context & visual-multi 2022-11-10 10:50:37 -05:00
52335f09c0 Adding whichkey 2022-11-09 21:55:56 -05:00
Andy Teijelo
4f20c382f4 Merge branch 'main' of git.ateijelo.com:ateijelo/nvim 2022-11-09 21:55:03 -05:00
Andy Teijelo
9e5738850e Updating treesitter 2022-11-09 21:54:42 -05:00
454f688e80 Add vala plugin; several keymaps 2022-11-07 09:16:43 -05:00
Andy Teijelo
35bb137263 small keymap tweaks 2022-11-03 11:11:08 -04:00
Andy Teijelo
66001689a5 gitsigns keymaps 2022-11-03 11:10:51 -04:00
Andy Teijelo
aeca5a8d4c Jenkinsfile's are groovy 2022-11-03 11:10:22 -04:00
a681654ff2 use treesitter to fold, disable treesitter indent for rust,
tell project.lua that Cargo.toml is a project root pattern
2022-11-03 11:09:12 -04:00
f577a76838 add vim-visual-multi 2022-11-01 12:13:20 -04:00
5f08f86295 Adding vim-lastplace and move.vim 2022-10-27 19:55:49 -04:00
df1313f131 move impatient higher up 2022-10-27 19:49:07 -04:00
61 changed files with 760 additions and 1395 deletions

53
.gitignore vendored
View file

@ -1,45 +1,8 @@
# Compiled Lua sources
luac.out
# luarocks build files
*.src.rock
*.zip
*.tar.gz
# Object files
*.o
*.os
*.ko
*.obj
*.elf
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
*.def
*.exp
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
plugin/packer_compiled.lua
java-debug/
vscode-java-test/
tt.*
.tests
doc/tags
debug
.repro
foo.*
*.log
data

15
.neoconf.json Normal file
View file

@ -0,0 +1,15 @@
{
"neodev": {
"library": {
"enabled": true,
"plugins": true
}
},
"neoconf": {
"plugins": {
"lua_ls": {
"enabled": true
}
}
}
}

2
after/ftplugin/c.lua Normal file
View file

@ -0,0 +1,2 @@
vim.opt.sw=2
vim.opt.ts=2

1
after/ftplugin/help.lua Normal file
View file

@ -0,0 +1 @@
vim.opt_local.conceallevel = 0

2
after/ftplugin/html.lua Normal file
View file

@ -0,0 +1,2 @@
vim.opt.sw=2
vim.opt.ts=2

2
after/ftplugin/lua.lua Normal file
View file

@ -0,0 +1,2 @@
vim.opt.sw=2
vim.opt.ts=2

View file

@ -1,27 +1,7 @@
-- keep these above
require "user.options"
require "user.keymaps"
require "user.plugins"
-- nvim-linux64/share/nvim/runtime/lua/vim/lsp.lua:354 is setting this keymap
-- before my LazyVim keymap.lua, and then it takes priority over my own keymap;
-- setting it to anything here prevents that from happening.
vim.keymap.set("n", "K", function () end)
--require "user.alpha"
require "user.autocommands"
require "user.colorscheme"
require "user.cmp"
require "user.telescope"
require "user.gitsigns"
require "user.treesitter"
require "user.autopairs"
require "user.comment"
require "user.nvim-tree"
require "user.bufferline"
require "user.lualine"
require "user.toggleterm"
require "user.project"
require "user.impatient"
require "user.illuminate"
require "user.indentline"
require "user.lsp"
require "user.dap"
require "user.exrc"
require "user.fidget"
-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy")

67
lazy-lock.json Normal file
View file

@ -0,0 +1,67 @@
{
"LazyVim": { "branch": "main", "commit": "0137a110c14e1d72b59dbb82ba804b568cdc5b18" },
"LuaSnip": { "branch": "master", "commit": "659c4479529a05cc9b05ef762639a09d366cc690" },
"SchemaStore.nvim": { "branch": "main", "commit": "dbf93f5074efe788a3c0a80c6680d9b9b64953b2" },
"bufferline.nvim": { "branch": "main", "commit": "5cc447cb2b463cb499c82eaeabbed4f5fa6a0a44" },
"catppuccin": { "branch": "main", "commit": "637d99e638bc6f1efedac582f6ccab08badac0c6" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"conform.nvim": { "branch": "master", "commit": "023f795dbcf32d4351b6a9ed2e613d471b5bb812" },
"crates.nvim": { "branch": "main", "commit": "8bf8358ee326d5d8c11dcd7ac0bcc9ff97dbc785" },
"dressing.nvim": { "branch": "master", "commit": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b" },
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
"gitsigns.nvim": { "branch": "main", "commit": "9521fe8be39255b9abc6ec54e352bf04c410f5cf" },
"grug-far.nvim": { "branch": "main", "commit": "9a2f78219390b47d67795ab09390d7f092e23976" },
"indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" },
"lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" },
"lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" },
"lsp_signature.nvim": { "branch": "master", "commit": "fc38521ea4d9ec8dbd4c2819ba8126cea743943b" },
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"mini.ai": { "branch": "main", "commit": "31c149067d38b97720d2a179619f7745a0006ecc" },
"mini.icons": { "branch": "main", "commit": "54686be7d58807906cb2c8c2216e0bf9c044f19a" },
"mini.indentscope": { "branch": "main", "commit": "da9af64649e114aa79480c238fd23f6524bc0903" },
"mini.nvim": { "branch": "main", "commit": "7b4d5d48b6b5a75009d63f8f3e4ef4819b7e8139" },
"mini.surround": { "branch": "main", "commit": "48a9795c9d352c771e1ab5dedab6063c0a2df037" },
"neo-tree.nvim": { "branch": "main", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" },
"noice.nvim": { "branch": "main", "commit": "ca2e3fea9fb080dcb79d9129d73dac631294fe79" },
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
"nvim-ansible": { "branch": "main", "commit": "44dabdaa8a9193b7f564a8408ed6d7107705030a" },
"nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" },
"nvim-dap": { "branch": "master", "commit": "6bf4de67dbe90271608e1c81797e5edc79ec6335" },
"nvim-dap-python": { "branch": "master", "commit": "3e3dd98d4d83715c9e0e429b4a5da7bd706e6ceb" },
"nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "76d80c3d171224315b61c006502a1e30c213a9ab" },
"nvim-lint": { "branch": "master", "commit": "36da8dd0ddc4f88e0beae234c20e75397326f143" },
"nvim-lspconfig": { "branch": "master", "commit": "d2d153a179ed59aa7134d7ebdf4d7dcb156efa22" },
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
"nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" },
"nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" },
"nvim-treesitter": { "branch": "master", "commit": "6389ceb1758b8f62a15194e3b790e33268304cb8" },
"nvim-treesitter-context": { "branch": "master", "commit": "158377d700596367a91ea41818f76abdbf75a232" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" },
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
"persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"repolink.nvim": { "branch": "master", "commit": "55edfedbaef3e894d2ab5107ea7fadc64cb8258d" },
"rustaceanvim": { "branch": "master", "commit": "8ece53be36515cb9e76f3d03511643636469502d" },
"snacks.nvim": { "branch": "main", "commit": "14c787540828946126f2acb5e542dc57956c2711" },
"tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
"telescope-terraform-doc.nvim": { "branch": "main", "commit": "28efe1f3cb2ed4c83fa69000ae8afd2f85d62826" },
"telescope-terraform.nvim": { "branch": "main", "commit": "072c97023797ca1a874668aaa6ae0b74425335df" },
"telescope.nvim": { "branch": "master", "commit": "85922dde3767e01d42a08e750a773effbffaea3e" },
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
"tokyonight.nvim": { "branch": "main", "commit": "9758827c3b380ba89da4a2212b6255d01afbcf08" },
"trouble.nvim": { "branch": "main", "commit": "3dc00c0447c016cd43e03054c3d49436a1f2076d" },
"ts-comments.nvim": { "branch": "main", "commit": "2002692ad1d3f6518d016550c20c2a890f0cbf0e" },
"venv-selector.nvim": { "branch": "regexp", "commit": "e82594274bf7b54387f9a2abe65f74909ac66e97" },
"vim-bbye": { "branch": "master", "commit": "25ef93ac5a87526111f43e5110675032dbcacf56" },
"vim-helm": { "branch": "master", "commit": "ae1ebc160d2b9b90108477ab10df7a4fc501e358" },
"vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" },
"which-key.nvim": { "branch": "main", "commit": "68e37e12913a66b60073906f5d3f14dee0de19f2" }
}

25
lazyvim.json Normal file
View file

@ -0,0 +1,25 @@
{
"extras": [
"lazyvim.plugins.extras.coding.mini-surround",
"lazyvim.plugins.extras.dap.core",
"lazyvim.plugins.extras.formatting.black",
"lazyvim.plugins.extras.formatting.prettier",
"lazyvim.plugins.extras.lang.ansible",
"lazyvim.plugins.extras.lang.docker",
"lazyvim.plugins.extras.lang.helm",
"lazyvim.plugins.extras.lang.json",
"lazyvim.plugins.extras.lang.python",
"lazyvim.plugins.extras.lang.rust",
"lazyvim.plugins.extras.lang.tailwind",
"lazyvim.plugins.extras.lang.terraform",
"lazyvim.plugins.extras.lang.toml",
"lazyvim.plugins.extras.lang.typescript",
"lazyvim.plugins.extras.lang.yaml",
"lazyvim.plugins.extras.ui.mini-indentscope",
"lazyvim.plugins.extras.ui.treesitter-context"
],
"news": {
"NEWS.md": "7107"
},
"version": 7
}

16
lua/config/autocmds.lua Normal file
View file

@ -0,0 +1,16 @@
-- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
-- Add any additional autocmds here
-- stop snippets when you leave to normal mode
vim.api.nvim_create_autocmd({ "ModeChanged" }, {
callback = function()
if
((vim.v.event.old_mode == "s" and vim.v.event.new_mode == "n") or vim.v.event.old_mode == "i")
and require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
and not require("luasnip").session.jump_active
then
require("luasnip").unlink_current()
end
end,
})

129
lua/config/keymaps.lua Normal file
View file

@ -0,0 +1,129 @@
-- 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
--
-- Shorten function name
local keymap = vim.keymap.set
-- Silent keymap option
local opts = { silent = true }
-- Remap LazyVim
keymap("n", "<Leader>l", "<Nop>", opts)
keymap("n", "<Leader>lz", "<cmd>:Lazy<cr>", { desc = "Lazy" })
-- Navigate buffers
for _, mode in ipairs({ "n", "i", "x" }) do
keymap(mode, "<M-l>", "<cmd>BufferLineCycleNext<CR>", opts)
keymap(mode, "<M-h>", "<cmd>BufferLineCyclePrev<CR>", opts)
end
keymap("n", "<H>", "<Nop>", opts)
keymap("n", "<L>", "<Nop>", opts)
keymap("n", "<M-L>", ":BufferLineMoveNext<CR>", opts)
keymap("n", "<M-H>", ":BufferLineMovePrev<CR>", opts)
function go_to_buffer(buffer)
return function()
require("bufferline").go_to(buffer, true)
end
end
for _, mode in ipairs({ "n", "i", "v" }) do
for i = 1, 8 do
vim.keymap.set(mode, "<A-" .. i .. ">", go_to_buffer(i), { noremap = true, silent = true })
end
vim.keymap.set(mode, "<A-9>", go_to_buffer(-1), { noremap = true, silent = true })
end
-- Clear highlights
keymap("n", "<leader>h", "<cmd>nohlsearch<CR>", opts)
-- Close buffers
keymap("n", "<M-q>", "<cmd>Bdelete<CR>", opts)
keymap("n", "<M-Q>", "<cmd>Bdelete!<CR>", opts)
-- search with '-', for my LatinAmerican layout
keymap("n", "-", "/", opts)
keymap("x", "-", "/", opts)
-- disable arrow keys
keymap("n", "<Right>", "<Nop>", opts)
keymap("n", "<Left>", "<Nop>", opts)
keymap("n", "<Up>", "<Nop>", opts)
keymap("n", "<Down>", "<Nop>", opts)
keymap("i", "<Right>", "<Nop>", opts)
keymap("i", "<Left>", "<Nop>", opts)
keymap("i", "<Up>", "<Nop>", opts)
keymap("i", "<Down>", "<Nop>", opts)
local function clean_screen()
vim.o.number = not vim.o.number
if vim.o.number then
if vim.diagnostic.get_next() then
pcall(vim.diagnostic.show)
end
vim.opt.signcolumn = "yes"
vim.g.miniindentscope_disable = false
MiniIndentscope.draw()
vim.cmd("syntax on")
vim.cmd("IBLEnable")
else
MiniIndentscope.undraw()
vim.g.miniindentscope_disable = true
if vim.diagnostic.get_next() then
vim.diagnostic.hide()
end
vim.opt.signcolumn = "no"
vim.cmd("syntax off")
vim.cmd("IBLDisable")
end
end
keymap("n", "<leader>n", clean_screen, opts)
function vim.getVisualSelection()
vim.cmd('noau normal! "vy"')
local text = vim.fn.getreg("v")
vim.fn.setreg("v", {})
text = string.gsub(text, "\n", "")
if #text > 0 then
return text
else
return ""
end
end
keymap("n", "<leader>ghl", "<cmd>RepoLink<CR>", opts)
keymap("x", "<leader>ghl", ":RepoLink<CR>", opts)
keymap("v", "<space>sw", function()
local tb = require("telescope.builtin")
local text = vim.getVisualSelection()
tb.live_grep({ default_text = text })
end, opts)
keymap("n", "<S-ScrollWheelDown>", "5zl")
keymap("n", "<S-ScrollWheelUp>", "5zh")
keymap("i", "<S-ScrollWheelDown>", "5zl")
keymap("i", "<S-ScrollWheelUp>", "5zh")
keymap("x", "<S-ScrollWheelDown>", "5zl")
keymap("x", "<S-ScrollWheelUp>", "5zh")
keymap("n", "<leader>j", vim.diagnostic.goto_next, opts)
keymap("n", "<leader>k", vim.diagnostic.goto_prev, opts)
keymap("n", "<F9>", "<cmd>DapToggleBreakpoint<CR>")
keymap("n", "<F5>", "<cmd>DapContinue<CR>")
keymap("n", "<F10>", "<cmd>DapStepOver<CR>")
keymap("n", "<F11>", "<cmd>DapStepInto<CR>")
keymap("n", "<S-F11>", "<cmd>DapStepOut<CR>")
vim.keymap.set("n", "K", require("noice.lsp").hover, { noremap = true, silent = true })
local function dismiss_notifications()
-- require("notify").dismiss({ silent = true, pending = true })
Snacks.notifier.hide()
vim.cmd("noh")
end
vim.keymap.set("n", "<Esc>", dismiss_notifications, { desc = "Dismiss notifications" })

51
lua/config/lazy.lua Normal file
View file

@ -0,0 +1,51 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
-- bootstrap lazy.nvim
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import any extras modules here
-- { import = "lazyvim.plugins.extras.lang.typescript" },
-- { import = "lazyvim.plugins.extras.linting.eslint" },
-- { import = "lazyvim.plugins.extras.formatting.prettier" },
-- { import = "lazyvim.plugins.extras.lang.json" },
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
-- import/override with your plugins
{ import = "plugins" },
},
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = { "tokyonight", "habamax" } },
checker = { enabled = true, notify = false }, -- automatically check for plugin updates
change_detection = {
notify = false,
},
performance = {
rtp = {
-- disable some rtp plugins
disabled_plugins = {
-- "gzip",
-- "matchit",
-- "matchparen",
-- "netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
-- "zipPlugin",
},
},
},
})

45
lua/config/options.lua Normal file
View file

@ -0,0 +1,45 @@
-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
vim.opt.relativenumber = false
vim.opt.conceallevel = 0
vim.opt.timeoutlen = 1000
vim.opt.list = false
vim.opt.pumblend = 0
vim.opt.tabstop = 4
vim.opt.shiftwidth = 4
vim.g.autoformat = false
vim.opt.completeopt = "menuone,noselect,preview"
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
vim.opt.foldenable = false
vim.opt.exrc = true
vim.opt.ttimeoutlen = 0
vim.opt.termsync = false
-- local osc52 = require("vim.ui.clipboard.osc52")
--
-- vim.g.clipboard = {
-- name = "OSC 52",
-- copy = {
-- ["+"] = function(lines)
-- vim.g._clipboard = lines
-- osc52.copy("+")(lines)
-- end,
-- ["*"] = function(lines)
-- vim.g._clipboard = lines
-- osc52.copy("*")(lines)
-- end,
-- },
-- paste = {
-- -- ['+'] = require('vim.ui.clipboard.osc52').paste('+'),
-- -- ['*'] = require('vim.ui.clipboard.osc52').paste('*'),
-- ["+"] = function()
-- return vim.g._clipboard
-- end,
-- ["*"] = function()
-- return vim.g._clipboard
-- end,
-- },
-- }

5
lua/plugins/bbye.lua Normal file
View file

@ -0,0 +1,5 @@
return {
{
"moll/vim-bbye",
},
}

View file

@ -0,0 +1,24 @@
return {
-- {
-- "catppuccin/nvim",
-- name = "catppuccin",
-- dependencies = {
-- "mg979/vim-visual-multi",
-- },
-- priority = 1000,
-- config = function()
-- require("catppuccin").setup({
-- custom_highlights = function(colors)
-- print("fuuuuuuuuuuuuuuuuuuuck", colors.red)
-- return {
-- TreesitterContext = { bg = colors.mantle },
-- TreesitterContextLineNumber = { bg = colors.mantle },
-- TreesitterContextBottom = { style = { "underline" } },
-- MultiCursor = { bg = colors.red },
-- VM_Cursor = { bg = colors.red },
-- }
-- end,
-- })
-- end,
-- },
}

108
lua/plugins/core.lua Normal file
View file

@ -0,0 +1,108 @@
-- local cmp = require("cmp")
return {
{
"folke/which-key.nvim",
opts = {
win = {
border = "single",
},
delay = 1000,
},
},
{
"LazyVim/LazyVim",
opts = {
colorscheme = "catppuccin",
},
},
{
"nvim-lualine/lualine.nvim",
opts = {
sections = {
lualine_z = {},
},
},
},
{
"L3MON4D3/LuaSnip",
dependencies = { "rafamadriz/friendly-snippets" },
opts = {
region_check_events = "CursorHold,InsertLeave",
delete_check_events = "TextChanged,InsertEnter,InsertLeave",
},
},
{
"hrsh7th/nvim-cmp",
-- dependencies = {
-- "hrsh7th/cmp-emoji",
-- },
--@param opts cmp.ConfigSchema
opts = function(_, opts)
local cmp = require("cmp")
local luasnip = require("luasnip")
local has_words_before = function()
unpack = unpack or table.unpack
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
-- opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "emoji" } }))
opts.window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
}
opts.formatting = {
format = function(entry, vim_item)
vim_item.abbr = string.sub(vim_item.abbr, 1, 40)
return vim_item
end,
}
opts.preselect = cmp.PreselectMode.None
opts.completion = {
completeopt = "menuone,noselect,preview",
}
opts.mapping = cmp.mapping.preset.insert({
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.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 = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
-- ["<CR>"] = cmp.config.disable,
["<S-CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true,
}), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<C-CR>"] = function(fallback)
cmp.abort()
fallback()
end,
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
-- this way you will only jump inside the snippet region
-- elseif luasnip.expand_or_locally_jumpable() then
-- luasnip.expand_or_jump()
elseif luasnip.expandable() then
luasnip.expand()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
-- elseif luasnip.in_snippet() and luasnip.jumpable(-1) then
-- luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
})
end,
},
}

8
lua/plugins/crates.lua Normal file
View file

@ -0,0 +1,8 @@
return {
"Saecki/crates.nvim",
opts = {
popup = {
border = "rounded"
}
}
}

12
lua/plugins/disabled.lua Normal file
View file

@ -0,0 +1,12 @@
return {
{ "echasnovski/mini.nvim", enabled = true },
{ "echasnovski/mini.pairs", enabled = false },
{ "echasnovski/mini.bufremove", enabled = false },
{ "folke/edgy.nvim", enabled = false },
{ "folke/flash.nvim", enabled = false },
-- { "rcarriga/nvim-notify", enabled = false },
{ "goolord/alpha-nvim", enabled = false },
{ "ggandor/leap.nvim", enabled = false },
{ "ggandor/flit.nvim", enabled = false },
{ "nvimdev/dashboard-nvim", enabled = false },
}

3
lua/plugins/dressing.lua Normal file
View file

@ -0,0 +1,3 @@
return {
{ "stevearc/dressing.nvim", opts = { input = { insert_only = false } } },
}

10
lua/plugins/fidget.lua Normal file
View file

@ -0,0 +1,10 @@
return {
{
"j-hui/fidget.nvim",
tag = 'legacy',
enabled = false,
init = function()
require("fidget").setup()
end,
},
}

17
lua/plugins/image.lua Normal file
View file

@ -0,0 +1,17 @@
return {
-- {
-- "vhyrro/luarocks.nvim",
-- priority = 1001,
-- opts = {
-- rocks = { "magick" },
-- },
-- },
-- {
-- "3rd/image.nvim",
-- dependencies = { "luarocks.nvim" },
-- opts = {
-- backend = "kitty",
-- -- tmux_show_only_in_active_window = true,
-- },
-- },
}

View file

@ -0,0 +1,19 @@
return {
{
"lukas-reineke/indent-blankline.nvim",
opts = {
indent = { char = "" },
},
},
{
"echasnovski/mini.indentscope",
opts = {
symbol = "",
-- options = { try_as_border = true },
draw = {
delay = 0,
animation = require("mini.indentscope").gen_animation.none(),
},
},
},
}

78
lua/plugins/lsp.lua Normal file
View file

@ -0,0 +1,78 @@
return {
{
"neovim/nvim-lspconfig",
init = function()
local format = function()
require("lazyvim.util").format({ force = true })
end
local keys = require("lazyvim.plugins.lsp.keymaps").get()
keys[#keys + 1] = { "<leader>lf", format, desc = "Format Document", has = "documentFormatting" }
keys[#keys + 1] = { "<leader>lf", format, desc = "Format Range", mode = "v", has = "documentRangeFormatting" }
keys[#keys + 1] = { "K", false } -- su puta madre!
vim.diagnostic.config({
float = { border = "rounded" },
})
end,
opts = {
diagnostics = {
update_in_insert = true,
},
setup = {
-- rust_analyzer = function()
-- return true
-- end,
tsserver = function()
return false
end,
vtsls = function()
return true
end,
},
servers = {
yamlls = {
settings = {
yaml = {
keyOrdering = false,
},
},
},
lua_ls = {
root_dir = function()
return vim.loop.cwd()
end,
-- ---@type LazyKeys[]
-- keys = {},
settings = {
Lua = {
workspace = {
checkThirdParty = false,
},
completion = {
callSnippet = "Replace",
},
},
},
},
vtsls = { enabled = false },
tsserver = {
enabled = true,
settings = {
typescript = {
inlayHints = {
includeInlayEnumMemberValueHints = true,
includeInlayFunctionLikeReturnTypeHints = true,
includeInlayFunctionParameterTypeHints = true,
includeInlayParameterNameHints = "literals",
includeInlayParameterNameHintsWhenArgumentMatchesName = false,
includeInlayPropertyDeclarationTypeHints = true,
includeInlayVariableTypeHints = false,
includeInlayVariableTypeHintsWhenTypeMatchesName = false,
},
},
},
},
},
},
},
}

View file

@ -0,0 +1,6 @@
return {
{
"ray-x/lsp_signature.nvim",
enabled = true,
},
}

13
lua/plugins/neotree.lua Normal file
View file

@ -0,0 +1,13 @@
return {
{
"nvim-neo-tree/neo-tree.nvim",
opts = {
window = {
mappings = {
["l"] = "open", -- open folders and files with l
},
},
use_popups_for_input = false,
},
},
}

46
lua/plugins/noice.lua Normal file
View file

@ -0,0 +1,46 @@
return {
"folke/noice.nvim",
-- commit = "d9328ef",
enabled = true,
opts = {
cmdline = {
view = "cmdline",
format = {
cmdline = { pattern = "^:", icon = ":", lang = "vim" },
},
},
views = {
hover = {
border = { style = "rounded" },
-- size = { max_width = 20 },
},
},
presets = {
bottom_search = true,
command_palette = false,
long_message_to_split = true,
lsp_doc_border = true,
},
routes = {
{
filter = {
event = "notify",
find = "Request textDocument/inlayHint failed",
},
opts = { skip = true },
},
{
filter = {
event = "notify",
find = "Debug Failure. False expression",
},
opts = { skip = true },
},
},
-- lsp = {
-- progress = {
-- enabled = false
-- }
-- },
},
}

View file

@ -0,0 +1,10 @@
return {
{
"rcarriga/nvim-notify",
opts = {
-- stages = "fade_in_slide_out",
stages = "static",
-- render = "compact",
},
},
}

9
lua/plugins/repolink.lua Normal file
View file

@ -0,0 +1,9 @@
return {
{
"9seconds/repolink.nvim",
opts = {
use_full_commit_hash = true,
bang_register = "+",
}
},
}

View file

@ -0,0 +1,12 @@
return {
-- {
-- "jose-elias-alvarez/typescript.nvim",
-- opts = {
-- init_options = {
-- preferences = {
-- importModuleSpecifierPreference = "relative",
-- },
-- },
-- },
-- },
}

View file

@ -0,0 +1,8 @@
return {
{
"mg979/vim-visual-multi",
init = function()
vim.g.VM_theme = "olive"
end,
},
}

View file

@ -1,35 +0,0 @@
local status_ok, alpha = pcall(require, "alpha")
if not status_ok then
return
end
local dashboard = require "alpha.themes.dashboard"
dashboard.section.header.val = {
[[ __ ]],
[[ ___ ___ ___ __ __ /\_\ ___ ___ ]],
[[ / _ `\ / __`\ / __`\/\ \/\ \\/\ \ / __` __`\ ]],
[[/\ \/\ \/\ __//\ \_\ \ \ \_/ |\ \ \/\ \/\ \/\ \ ]],
[[\ \_\ \_\ \____\ \____/\ \___/ \ \_\ \_\ \_\ \_\]],
[[ \/_/\/_/\/____/\/___/ \/__/ \/_/\/_/\/_/\/_/]],
}
dashboard.section.buttons.val = {
dashboard.button("f", "" .. " Find file", ":Telescope find_files <CR>"),
dashboard.button("e", "" .. " New file", ":ene <BAR> startinsert <CR>"),
dashboard.button("p", "" .. " Find project", ":lua require('telescope').extensions.projects.projects()<CR>"),
dashboard.button("r", "" .. " Recent files", ":Telescope oldfiles <CR>"),
dashboard.button("t", "" .. " Find text", ":Telescope live_grep <CR>"),
dashboard.button("c", "" .. " Config", ":e ~/.config/nvim/init.lua <CR>"),
dashboard.button("q", "" .. " Quit", ":qa<CR>"),
}
local function footer()
return "chrisatmachine.com"
end
dashboard.section.footer.val = footer()
dashboard.section.footer.opts.hl = "Type"
dashboard.section.header.opts.hl = "Include"
dashboard.section.buttons.opts.hl = "Keyword"
dashboard.opts.opts.noautocmd = true
alpha.setup(dashboard.opts)

View file

@ -1,71 +0,0 @@
vim.api.nvim_create_autocmd({ "FileType" }, {
pattern = { "qf", "help", "man", "lspinfo", "spectre_panel" },
callback = function()
vim.cmd([[
nnoremap <silent> <buffer> q :close<CR>
set nobuflisted
]])
end,
})
vim.api.nvim_create_autocmd({ "FileType" }, {
pattern = { "gitcommit"},
callback = function()
vim.opt_local.wrap = true
vim.opt_local.spell = true
end,
})
vim.api.nvim_create_autocmd({ "FileType" }, {
pattern = { "markdown" },
callback = function()
vim.opt_local.wrap = true
vim.opt_local.spell = true
end,
})
vim.cmd("autocmd BufEnter * ++nested if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif")
-- vim.api.nvim_create_autocmd({ "BufEnter" }, {
-- callback = function()
-- vim.cmd [[
-- if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif
-- ]]
-- end,
-- })
vim.api.nvim_create_autocmd({ "VimResized" }, {
callback = function()
vim.cmd("tabdo wincmd =")
end,
})
vim.api.nvim_create_autocmd({ "CmdWinEnter" }, {
callback = function()
vim.cmd("quit")
end,
})
vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
callback = function()
vim.cmd("set formatoptions-=cro")
end,
})
vim.api.nvim_create_autocmd({ "TextYankPost" }, {
callback = function()
vim.highlight.on_yank({ higroup = "Visual", timeout = 200 })
end,
})
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
pattern = { "*.java" },
callback = function()
vim.lsp.codelens.refresh()
end,
})
vim.api.nvim_create_autocmd({ "VimEnter" }, {
callback = function()
vim.cmd("hi link illuminatedWord LspReferenceText")
end,
})

View file

@ -1,34 +0,0 @@
-- Setup nvim-cmp.
local status_ok, npairs = pcall(require, "nvim-autopairs")
if not status_ok then
return
end
npairs.setup({
check_ts = true, -- treesitter integration
disable_filetype = { "TelescopePrompt" },
ts_config = {
lua = { "string", "source" },
javascript = { "string", "template_string" },
java = false,
},
fast_wrap = {
map = "<M-e>",
chars = { "{", "[", "(", '"', "'" },
pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], "%s+", ""),
offset = 0, -- Offset from pattern match
end_key = "$",
keys = "qwertyuiopzxcvbnmasdfghjkl",
check_comma = true,
highlight = "PmenuSel",
highlight_grey = "LineNr",
},
})
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
local cmp_status_ok, cmp = pcall(require, "cmp")
if not cmp_status_ok then
return
end
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done({}))

View file

@ -1,104 +0,0 @@
local status_ok, bufferline = pcall(require, "bufferline")
if not status_ok then
return
end
bufferline.setup {
options = {
close_command = "Bdelete! %d", -- can be a string | function, see "Mouse actions"
right_mouse_command = "Bdelete! %d", -- can be a string | function, see "Mouse actions"
offsets = { { filetype = "NvimTree", text = "", padding = 1 } },
separator_style = "thin", -- | "thick" | "thin" | { 'any', 'any' },
always_show_bufferline = false
},
highlights = {
fill = {
fg = { attribute = "fg", highlight = "#ff0000" },
bg = { attribute = "bg", highlight = "TabLine" },
},
background = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
buffer_visible = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
close_button = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
close_button_visible = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
tab_selected = {
fg = { attribute = "fg", highlight = "Normal" },
bg = { attribute = "bg", highlight = "Normal" },
},
tab = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
tab_close = {
-- fg = {attribute='fg',highlight='LspDiagnosticsDefaultError'},
fg = { attribute = "fg", highlight = "TabLineSel" },
bg = { attribute = "bg", highlight = "Normal" },
},
duplicate_selected = {
fg = { attribute = "fg", highlight = "TabLineSel" },
bg = { attribute = "bg", highlight = "TabLineSel" },
italic = true,
},
duplicate_visible = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
italic = true,
},
duplicate = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
italic = true,
},
modified = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
modified_selected = {
fg = { attribute = "fg", highlight = "Normal" },
bg = { attribute = "bg", highlight = "Normal" },
},
modified_visible = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
separator = {
fg = { attribute = "bg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
separator_selected = {
fg = { attribute = "bg", highlight = "Normal" },
bg = { attribute = "bg", highlight = "Normal" },
},
indicator_selected = {
fg = { attribute = "fg", highlight = "LspDiagnosticsDefaultHint" },
bg = { attribute = "bg", highlight = "Normal" },
},
},
}

View file

@ -1,128 +0,0 @@
local cmp_status_ok, cmp = pcall(require, "cmp")
if not cmp_status_ok then
return
end
local snip_status_ok, luasnip = pcall(require, "luasnip")
if not snip_status_ok then
return
end
require("luasnip/loaders/from_vscode").lazy_load()
local check_backspace = function()
local col = vim.fn.col(".") - 1
return col == 0 or vim.fn.getline("."):sub(col, col):match("%s")
end
local kind_icons = {
Text = "",
Method = "",
Function = "",
Constructor = "",
Field = "",
Variable = "",
Class = "",
Interface = "",
Module = "",
Property = "",
Unit = "",
Value = "",
Enum = "",
Keyword = "",
Snippet = "",
Color = "",
File = "",
Reference = "",
Folder = "",
EnumMember = "",
Constant = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = "",
}
cmp.setup({
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body) -- For `luasnip` users.
end,
},
mapping = cmp.mapping.preset.insert({
["<C-k>"] = cmp.mapping.select_prev_item(),
["<C-j>"] = cmp.mapping.select_next_item(),
["<C-b>"] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }),
["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }),
["<C-Space>"] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }),
["<C-e>"] = cmp.mapping({
i = cmp.mapping.abort(),
c = cmp.mapping.close(),
}),
-- Accept currently selected item. If none selected, `select` first item.
-- Set `select` to `false` to only confirm explicitly selected items.
["<CR>"] = cmp.mapping.confirm({ select = true }),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expandable() then
luasnip.expand()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif check_backspace() then
fallback()
else
fallback()
end
end, {
"i",
"s",
}),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, {
"i",
"s",
}),
}),
formatting = {
fields = { "kind", "abbr", "menu" },
format = function(entry, vim_item)
vim_item.kind = kind_icons[vim_item.kind]
vim_item.menu = ({
nvim_lsp = "",
nvim_lua = "",
luasnip = "",
buffer = "",
path = "",
emoji = "",
})[entry.source.name]
return vim_item
end,
},
sources = {
{ name = "nvim_lsp" },
{ name = "nvim_lua" },
{ name = "luasnip" },
{ name = "buffer" },
{ name = "path" },
},
confirm_opts = {
behavior = cmp.ConfirmBehavior.Replace,
select = false,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
experimental = {
ghost_text = true,
},
})

View file

@ -1,17 +0,0 @@
--require("catppuccin").setup()
--vim.cmd [[colorscheme catppuccin]]
--TokyonNight
--local colorscheme = "tokyonight-night"
--Catppuccin
vim.g.catppuccin_flavour = "mocha" -- latte, frappe, macchiato, mocha
local colorscheme = "catppuccin"
--DarkPlus
--local colorscheme = "darkplus"
local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
if not status_ok then
return
end

View file

@ -1,29 +0,0 @@
local status_ok, comment = pcall(require, "Comment")
if not status_ok then
return
end
comment.setup({
pre_hook = function(ctx)
-- Only calculate commentstring for tsx filetypes
if vim.bo.filetype == "typescriptreact" then
local U = require("Comment.utils")
-- Determine whether to use linewise or blockwise commentstring
local type = ctx.ctype == U.ctype.linewise and "__default" or "__multiline"
-- Determine the location where to calculate commentstring from
local location = nil
if ctx.ctype == U.ctype.blockwise then
location = require("ts_context_commentstring.utils").get_cursor_location()
elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then
location = require("ts_context_commentstring.utils").get_visual_start_location()
end
return require("ts_context_commentstring.internal").calculate_commentstring({
key = type,
location = location,
})
end
end,
})

View file

@ -1,65 +0,0 @@
local dap_status_ok, dap = pcall(require, "dap")
if not dap_status_ok then
return
end
local dap_ui_status_ok, dapui = pcall(require, "dapui")
if not dap_ui_status_ok then
return
end
local dap_install_status_ok, dap_install = pcall(require, "dap-install")
if not dap_install_status_ok then
return
end
dap_install.setup {}
dap_install.config("python", {})
dap_install.config("codelldb", {})
-- add other configs here
dapui.setup()
--dapui.setup {
-- sidebar = {
-- elements = {
-- {
-- id = "scopes",
-- size = 0.25, -- Can be float or integer > 1
-- },
-- { id = "breakpoints", size = 0.25 },
-- },
-- size = 40,
-- position = "right", -- Can be "left", "right", "top", "bottom"
-- },
-- tray = {
-- elements = {},
-- },
--}
vim.fn.sign_define("DapBreakpoint", { text = "", texthl = "DiagnosticSignError", linehl = "", numhl = "" })
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close()
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close()
end
local codelldb_path = "/usr/lib/codelldb/adapter/codelldb"
local liblldb_path = "/usr/lib/codelldb/adapter/libcodelldb.so"
dap.adapters.codelldb = {
type = 'server',
host = '127.0.0.1',
port = "13000",
executable = {
command = codelldb_path,
args = {"--liblldb", liblldb_path, "--port", "13000", "--params", "{\"showDisassembly\": \"never\"}"},
}
}

View file

@ -1,9 +0,0 @@
-- Setup exrc
local status_ok, exrc = pcall(require, "exrc")
if not status_ok then
return
end
exrc.setup({
files = { ".nvimrc.lua" }
})

View file

@ -1,6 +0,0 @@
local ok, fidget = pcall(require, "fidget")
if not ok then
return
end
fidget.setup()

View file

@ -1,36 +0,0 @@
local status_ok, gitsigns = pcall(require, "gitsigns")
if not status_ok then
return
end
gitsigns.setup {
signs = {
add = { hl = "GitSignsAdd", text = "", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" },
change = { hl = "GitSignsChange", text = "", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" },
delete = { hl = "GitSignsDelete", text = "", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
topdelete = { hl = "GitSignsDelete", text = "", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
changedelete = { hl = "GitSignsChange", text = "", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" },
},
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
watch_gitdir = {
interval = 1000,
follow_files = true,
},
attach_to_untracked = true,
current_line_blame_opts = {
virt_text = true,
virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align'
delay = 1000,
},
sign_priority = 6,
update_debounce = 100,
status_formatter = nil, -- Use default
preview_config = {
-- Options passed to nvim_open_win
border = "single",
style = "minimal",
relative = "cursor",
row = 0,
col = 1,
},
}

View file

@ -1,38 +0,0 @@
local status_ok, illuminate = pcall(require, "illuminate")
if not status_ok then
return
end
vim.g.Illuminate_ftblacklist = {'alpha', 'NvimTree'}
vim.api.nvim_set_keymap('n', '<a-n>', '<cmd>lua require"illuminate".next_reference{wrap=true}<cr>', {noremap=true})
vim.api.nvim_set_keymap('n', '<a-p>', '<cmd>lua require"illuminate".next_reference{reverse=true,wrap=true}<cr>', {noremap=true})
illuminate.configure {
providers = {
"lsp",
"treesitter",
"regex",
},
delay = 200,
filetypes_denylist = {
"dirvish",
"fugitive",
"alpha",
"NvimTree",
"packer",
"neogitstatus",
"Trouble",
"lir",
"Outline",
"spectre_panel",
"toggleterm",
"DressingSelect",
"TelescopePrompt",
},
filetypes_allowlist = {},
modes_denylist = {},
modes_allowlist = {},
providers_regex_syntax_denylist = {},
providers_regex_syntax_allowlist = {},
under_cursor = true,
}

View file

@ -1,6 +0,0 @@
local status_ok, impatient = pcall(require, "impatient")
if not status_ok then
return
end
impatient.enable_profile()

View file

@ -1,19 +0,0 @@
local enabled = false
local status_ok, indent_blankline = pcall(require, "indent_blankline")
if (not enabled) or (not status_ok) then
return
end
--indent_blankline.setup {
-- char = "▏",
-- show_trailing_blankline_indent = false,
-- show_first_indent_level = true,
-- use_treesitter = true,
-- show_current_context = true,
-- buftype_exclude = { "terminal", "nofile" },
-- filetype_exclude = {
-- "help",
-- "packer",
-- "NvimTree",
-- },
--}

View file

@ -1,99 +0,0 @@
-- Shorten function name
local keymap = vim.keymap.set
-- Silent keymap option
local opts = { silent = true }
--Remap space as leader key
keymap("", "<Space>", "<Nop>", opts)
vim.g.mapleader = " "
-- Modes
-- normal_mode = "n",
-- insert_mode = "i",
-- visual_mode = "v",
-- visual_block_mode = "x",
-- term_mode = "t",
-- command_mode = "c",
-- Normal --
-- Better window navigation
keymap("n", "<C-h>", "<C-w>h", opts)
keymap("n", "<C-j>", "<C-w>j", opts)
keymap("n", "<C-k>", "<C-w>k", opts)
keymap("n", "<C-l>", "<C-w>l", opts)
-- Resize with arrows
keymap("n", "<C-Up>", ":resize -2<CR>", opts)
keymap("n", "<C-Down>", ":resize +2<CR>", opts)
keymap("n", "<C-Left>", ":vertical resize -2<CR>", opts)
keymap("n", "<C-Right>", ":vertical resize +2<CR>", opts)
-- Navigate buffers
keymap("n", "<S-l>", ":bnext<CR>", opts)
keymap("n", "<S-h>", ":bprevious<CR>", opts)
for _, mode in ipairs({"n", "i", "v"}) do
vim.keymap.set(mode, '<A-1>', "<Cmd>BufferLineGoToBuffer 1<CR>", { noremap = true, silent = true })
vim.keymap.set(mode, '<A-2>', "<Cmd>BufferLineGoToBuffer 2<CR>", { noremap = true, silent = true })
vim.keymap.set(mode, '<A-3>', "<Cmd>BufferLineGoToBuffer 3<CR>", { noremap = true, silent = true })
vim.keymap.set(mode, '<A-4>', "<Cmd>BufferLineGoToBuffer 4<CR>", { noremap = true, silent = true })
vim.keymap.set(mode, '<A-5>', "<Cmd>BufferLineGoToBuffer 5<CR>", { noremap = true, silent = true })
end
-- Clear highlights
keymap("n", "<leader>h", "<cmd>nohlsearch<CR>", opts)
-- Close buffers
keymap("n", "<S-q>", "<cmd>Bdelete<CR>", opts)
keymap("n", "<S-q>", "<cmd>Bdelete!<CR>", opts)
-- Better paste
keymap("v", "p", '"_dP', opts)
-- Insert --
-- Press jk fast to enter
--keymap("i", "jk", "<ESC>", opts)
-- Visual --
-- Stay in indent mode
keymap("v", "<", "<gv", opts)
keymap("v", ">", ">gv", opts)
-- Plugins --
-- NvimTree
keymap("n", "<leader>e", ":NvimTreeToggle<CR>", opts)
-- Telescope
keymap("n", "<leader>ff", ":Telescope find_files<CR>", opts)
keymap("n", "<leader>ft", ":Telescope live_grep<CR>", opts)
keymap("n", "<leader>fp", ":Telescope projects<CR>", opts)
keymap("n", "<leader>fb", ":Telescope buffers<CR>", opts)
-- Git
--keymap("n", "<leader>gg", "<cmd>lua _LAZYGIT_TOGGLE()<CR>", opts)
-- Comment
keymap("n", "<leader>/", "<cmd>lua require('Comment.api').toggle_current_linewise()<CR>", opts)
keymap("x", "<leader>/", '<ESC><CMD>lua require("Comment.api").toggle_linewise_op(vim.fn.visualmode())<CR>')
-- DAP
keymap("n", "<F9>", "<cmd>lua require'dap'.toggle_breakpoint()<cr>", opts)
keymap("n", "<F5>", "<cmd>lua require'dap'.continue()<cr>", opts)
keymap("n", "<F10>", "<cmd>lua require'dap'.step_over()<cr>", opts)
keymap("n", "<F11>", "<cmd>lua require'dap'.step_into()<cr>", opts)
keymap("n", "<F23>", "<cmd>lua require'dap'.step_out()<cr>", opts)
keymap("n", "<leader>dr", "<cmd>lua require'dap'.repl.toggle()<cr>", opts)
keymap("n", "<leader>dl", "<cmd>lua require'dap'.run_last()<cr>", opts)
keymap("n", "<leader>du", "<cmd>lua require'dapui'.toggle()<cr>", opts)
keymap("n", "<F17>", "<cmd>lua require'dap'.terminate()<cr>", opts) -- Shift+F5
---- Vimspector
--keymap("n", "<F9>", "<Plug>VimspectorToggleBreakpoint", opts)
--keymap("n", "<F5>", "<plug>VimspectorContinue", opts)
--keymap("n", "<F10>", "<Plug>VimspectorStepOver", opts)
--keymap("n", "<F11>", "<Plug>VimspectorStepInto", opts)
--keymap("n", "<F23>", "<Plug>VimspectorStepOut", opts)
--keymap("n", "<F17>", "<cmd>VimspectorReset<cr>", opts) -- Shift+F5
--keymap("n", "<F41>", "<Plug>VimspectorRestart", opts) -- Ctrl+Shift+F5
--keymap("n", "<leader>di", "<Plug>VimspectorBalloonEval", opts)

View file

@ -1,97 +0,0 @@
local M = {}
local status_cmp_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
if not status_cmp_ok then
return
end
M.capabilities = vim.lsp.protocol.make_client_capabilities()
M.capabilities.textDocument.completion.completionItem.snippetSupport = true
M.capabilities = cmp_nvim_lsp.update_capabilities(M.capabilities)
M.setup = function()
local signs = {
{ name = "DiagnosticSignError", text = "" },
{ name = "DiagnosticSignWarn", text = "" },
{ name = "DiagnosticSignHint", text = "" },
{ name = "DiagnosticSignInfo", text = "" },
}
for _, sign in ipairs(signs) do
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
end
local config = {
virtual_text = true, -- disable virtual text
signs = {
active = signs, -- show signs
},
update_in_insert = true,
underline = true,
severity_sort = true,
float = {
focusable = true,
style = "minimal",
border = "rounded",
source = "always",
header = "",
prefix = "",
},
}
vim.diagnostic.config(config)
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
border = "rounded",
})
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
border = "rounded",
})
end
local function lsp_keymaps(bufnr)
local opts = { noremap = true, silent = true }
local keymap = vim.api.nvim_buf_set_keymap
keymap(bufnr, "n", "gD", "<cmd>lua vim.lsp.buf.declaration()<CR>", opts)
keymap(bufnr, "n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts)
keymap(bufnr, "n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts)
keymap(bufnr, "n", "gI", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
keymap(bufnr, "n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
keymap(bufnr, "n", "gl", "<cmd>lua vim.diagnostic.open_float()<CR>", opts)
keymap(bufnr, "n", "<leader>lf", "<cmd>lua vim.lsp.buf.format{ async = true }<cr>", opts)
keymap(bufnr, "v", "<leader>lf", "<esc><cmd>'<,'>lua vim.lsp.buf.format()<cr>", opts)
keymap(bufnr, "x", "<leader>lf", "<esc><cmd>'<,'>lua vim.lsp.buf.format()<cr>", opts)
keymap(bufnr, "n", "<leader>li", "<cmd>LspInfo<cr>", opts)
keymap(bufnr, "n", "<leader>lI", "<cmd>LspInstallInfo<cr>", opts)
keymap(bufnr, "n", "<leader>la", "<cmd>lua vim.lsp.buf.code_action()<cr>", opts)
keymap(bufnr, "n", "<leader>lj", "<cmd>lua vim.diagnostic.goto_next({buffer=0})<cr>", opts)
keymap(bufnr, "n", "<leader>lk", "<cmd>lua vim.diagnostic.goto_prev({buffer=0})<cr>", opts)
keymap(bufnr, "n", "<leader>lr", "<cmd>lua vim.lsp.buf.rename()<cr>", opts)
keymap(bufnr, "n", "<leader>ls", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
keymap(bufnr, "n", "<leader>lq", "<cmd>lua vim.diagnostic.setloclist()<CR>", opts)
keymap(bufnr, "v", "<leader>lf", "<esc><cmd>'<,'>lua vim.lsp.buf.format{ async = true }<cr>", opts)
keymap(bufnr, "x", "<leader>lf", "<esc><cmd>'<,'>lua vim.lsp.buf.format{ async = true }<cr>", opts)
end
M.on_attach = function(client, bufnr)
if client.name == "tsserver" then
client.server_capabilities.documentFormattingProvider = false
end
if client.name == "sumneko_lua" then
client.server_capabilities.documentFormattingProvider = false
end
lsp_keymaps(bufnr)
local status_ok, illuminate = pcall(require, "illuminate")
if not status_ok then
return
end
illuminate.on_attach(client)
end
return M

View file

@ -1,8 +0,0 @@
local status_ok, _ = pcall(require, "lspconfig")
if not status_ok then
return
end
require("user.lsp.mason")
require("user.lsp.handlers").setup()
require("user.lsp.null-ls")

View file

@ -1,54 +0,0 @@
local servers = {
"sumneko_lua",
"cssls",
"html",
"tsserver",
"pyright",
"bashls",
"jsonls",
"yamlls",
"rust_analyzer",
"gopls"
}
local settings = {
ui = {
border = "none",
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = "",
},
},
log_level = vim.log.levels.INFO,
max_concurrent_installers = 4,
}
require("mason").setup(settings)
require("mason-lspconfig").setup({
ensure_installed = servers,
automatic_installation = false,
})
local lspconfig_status_ok, lspconfig = pcall(require, "lspconfig")
if not lspconfig_status_ok then
return
end
local opts = {}
for _, server in pairs(servers) do
opts = {
on_attach = require("user.lsp.handlers").on_attach,
capabilities = require("user.lsp.handlers").capabilities,
}
server = vim.split(server, "@")[1]
local require_ok, conf_opts = pcall(require, "user.lsp.settings." .. server)
if require_ok then
opts = vim.tbl_deep_extend("force", conf_opts, opts)
end
lspconfig[server].setup(opts)
end

View file

@ -1,24 +0,0 @@
local null_ls_status_ok, null_ls = pcall(require, "null-ls")
if not null_ls_status_ok then
return
end
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
local formatting = null_ls.builtins.formatting
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
local diagnostics = null_ls.builtins.diagnostics
-- https://github.com/prettier-solidity/prettier-plugin-solidity
null_ls.setup {
debug = false,
sources = {
formatting.prettier.with {
extra_filetypes = { "toml" },
extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote" },
},
formatting.black.with { extra_args = { "--fast" } },
formatting.stylua,
formatting.google_java_format,
diagnostics.flake8,
},
}

View file

@ -1,9 +0,0 @@
return {
settings = {
python = {
analysis = {
typeCheckingMode = "on",
},
},
},
}

View file

@ -1,18 +0,0 @@
return {
settings = {
Lua = {
diagnostics = {
globals = { "vim" },
},
workspace = {
library = {
[vim.fn.expand "$VIMRUNTIME/lua"] = false,
[vim.fn.stdpath "config" .. "/lua"] = false,
},
},
telemetry = {
enable = false,
},
},
},
}

View file

@ -1,58 +0,0 @@
local status_ok, lualine = pcall(require, "lualine")
if not status_ok then
return
end
local hide_in_width = function()
return vim.fn.winwidth(0) > 80
end
local diagnostics = {
"diagnostics",
sources = { "nvim_diagnostic" },
sections = { "error", "warn" },
symbols = { error = "", warn = "" },
colored = false,
always_visible = true,
}
local diff = {
"diff",
colored = false,
symbols = { added = "", modified = "", removed = "" }, -- changes diff symbols
cond = hide_in_width,
}
local filetype = {
"filetype",
icons_enabled = false,
}
local location = {
"location",
padding = 0,
}
local spaces = function()
return "spaces: " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
end
lualine.setup {
options = {
globalstatus = true,
icons_enabled = true,
theme = "auto",
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = { "alpha", "dashboard" },
always_divide_middle = true,
},
sections = {
lualine_a = { "mode" },
lualine_b = {"branch"},
lualine_c = { diagnostics },
lualine_x = { diff, spaces, "encoding", filetype },
lualine_y = { location },
lualine_z = { "progress" },
},
}

View file

@ -1,67 +0,0 @@
local status_ok, nvim_tree = pcall(require, "nvim-tree")
if not status_ok then
return
end
local config_status_ok, nvim_tree_config = pcall(require, "nvim-tree.config")
if not config_status_ok then
return
end
local tree_cb = nvim_tree_config.nvim_tree_callback
nvim_tree.setup {
update_focused_file = {
enable = true,
update_cwd = true,
},
renderer = {
root_folder_modifier = ":t",
icons = {
glyphs = {
default = "",
symlink = "",
folder = {
arrow_open = "",
arrow_closed = "",
default = "",
open = "",
empty = "",
empty_open = "",
symlink = "",
symlink_open = "",
},
git = {
unstaged = "",
staged = "S",
unmerged = "",
renamed = "",
untracked = "U",
deleted = "",
ignored = "",
},
},
},
},
diagnostics = {
enable = true,
show_on_dirs = true,
icons = {
hint = "",
info = "",
warning = "",
error = "",
},
},
view = {
width = 30,
side = "left",
mappings = {
list = {
{ key = { "l", "<CR>", "o" }, cb = tree_cb "edit" },
{ key = "h", cb = tree_cb "close_node" },
{ key = "v", cb = tree_cb "vsplit" },
},
},
},
}

View file

@ -1,40 +0,0 @@
vim.opt.backup = false -- creates a backup file
vim.opt.clipboard = "unnamedplus" -- allows neovim to access the system clipboard
vim.opt.cmdheight = 1 -- more space in the neovim command line for displaying messages
vim.opt.completeopt = { "menuone", "noselect" } -- mostly just for cmp
vim.opt.conceallevel = 0 -- so that `` is visible in markdown files
vim.opt.fileencoding = "utf-8" -- the encoding written to a file
vim.opt.hlsearch = true -- highlight all matches on previous search pattern
vim.opt.ignorecase = true -- ignore case in search patterns
vim.opt.mouse = "a" -- allow the mouse to be used in neovim
vim.opt.pumheight = 10 -- pop up menu height
vim.opt.showmode = false -- we don't need to see things like -- INSERT -- anymore
vim.opt.showtabline = 0 -- always show tabs
vim.opt.smartcase = true -- smart case
vim.opt.smartindent = true -- make indenting smarter again
vim.opt.splitbelow = true -- force all horizontal splits to go below current window
vim.opt.splitright = true -- force all vertical splits to go to the right of current window
vim.opt.swapfile = false -- creates a swapfile
vim.opt.termguicolors = true -- set term gui colors (most terminals support this)
vim.opt.timeoutlen = 1000 -- time to wait for a mapped sequence to complete (in milliseconds)
vim.opt.undofile = true -- enable persistent undo
vim.opt.updatetime = 300 -- faster completion (4000ms default)
vim.opt.writebackup = false -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited
vim.opt.expandtab = true -- convert tabs to spaces
vim.opt.shiftwidth = 4 -- the number of spaces inserted for each indentation
vim.opt.tabstop = 4 -- insert 2 spaces for a tab
vim.opt.cursorline = true -- highlight the current line
vim.opt.number = true -- set numbered lines
vim.opt.laststatus = 3 -- only the last window will always have a status line
vim.opt.showcmd = true -- hide (partial) command in the last line of the screen (for performance)
vim.opt.ruler = false -- hide the line and column number of the cursor position
--vim.opt.numberwidth = 4 -- minimal number of columns to use for the line number {default 4}
vim.opt.signcolumn = "yes" -- always show the sign column, otherwise it would shift the text each time
vim.opt.wrap = false -- display lines as one long line
vim.opt.scrolloff = 8 -- minimal number of screen lines to keep above and below the cursor
vim.opt.sidescrolloff = 8 -- minimal number of screen columns to keep to the left and right of the cursor if wrap is `false`
vim.opt.guifont = "monospace:h17" -- the font used in graphical neovim applications
vim.opt.fillchars.eob=" " -- show empty lines at the end of a buffer as ` ` {default `~`}
vim.opt.shortmess:append "c" -- hide all the completion messages, e.g. "-- XXX completion (YYY)", "match 1 of 2", "The only match", "Pattern not found"
vim.opt.whichwrap:append("<,>,[,],h,l") -- keys allowed to move to the previous/next line when the beginning/end of line is reached
vim.opt.iskeyword:append("-") -- treats words with `-` as single words

View file

@ -1,123 +0,0 @@
local fn = vim.fn
-- Automatically install packer
local install_path = fn.stdpath "data" .. "/site/pack/packer/start/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
PACKER_BOOTSTRAP = fn.system {
"git",
"clone",
"--depth",
"1",
"https://github.com/wbthomason/packer.nvim",
install_path,
}
print "Installing packer close and reopen Neovim..."
vim.cmd [[packadd packer.nvim]]
end
-- Autocommand that reloads neovim whenever you save the plugins.lua file
vim.cmd [[
augroup packer_user_config
autocmd!
autocmd BufWritePost plugins.lua source <afile> | PackerSync
augroup end
]]
-- Use a protected call so we don't error out on first use
local status_ok, packer = pcall(require, "packer")
if not status_ok then
return
end
-- Have packer use a popup window
packer.init {
display = {
open_fn = function()
return require("packer.util").float { border = "rounded" }
end,
},
git = {
clone_timeout = 300, -- Timeout, in seconds, for git clones
},
}
-- Install your plugins here
return packer.startup(function(use)
-- My plugins here
use { "wbthomason/packer.nvim", commit = "6afb67460283f0e990d35d229fd38fdc04063e0a" } -- Have packer manage itself
use { "nvim-lua/plenary.nvim", commit = "4b7e52044bbb84242158d977a50c4cbcd85070c7" } -- Useful lua functions used by lots of plugins
use { "windwp/nvim-autopairs", commit = "4fc96c8f3df89b6d23e5092d31c866c53a346347" } -- Autopairs, integrates with both cmp and treesitter
use { "numToStr/Comment.nvim", commit = "97a188a98b5a3a6f9b1b850799ac078faa17ab67" }
use { "JoosepAlviste/nvim-ts-context-commentstring", commit = "4d3a68c41a53add8804f471fcc49bb398fe8de08" }
use { "kyazdani42/nvim-web-devicons", commit = "563f3635c2d8a7be7933b9e547f7c178ba0d4352" }
use { "kyazdani42/nvim-tree.lua", commit = "7282f7de8aedf861fe0162a559fc2b214383c51c" }
use { "akinsho/bufferline.nvim", commit = "83bf4dc7bff642e145c8b4547aa596803a8b4dc4" }
use { "moll/vim-bbye", commit = "25ef93ac5a87526111f43e5110675032dbcacf56" }
use { "nvim-lualine/lualine.nvim", commit = "a52f078026b27694d2290e34efa61a6e4a690621" }
use { "akinsho/toggleterm.nvim", commit = "2a787c426ef00cb3488c11b14f5dcf892bbd0bda" }
use { "ahmedkhalf/project.nvim", commit = "628de7e433dd503e782831fe150bb750e56e55d6" }
use { "lewis6991/impatient.nvim", commit = "b842e16ecc1a700f62adb9802f8355b99b52a5a6" }
--use { "lukas-reineke/indent-blankline.nvim", commit = "db7cbcb40cc00fc5d6074d7569fb37197705e7f6" }
use { "goolord/alpha-nvim", commit = "0bb6fc0646bcd1cdb4639737a1cee8d6e08bcc31" }
-- Colorschemes
use { "folke/tokyonight.nvim", commit = "66bfc2e8f754869c7b651f3f47a2ee56ae557764" }
use { "lunarvim/darkplus.nvim", commit = "13ef9daad28d3cf6c5e793acfc16ddbf456e1c83" }
use { "catppuccin/nvim", as = "catppuccin" }
-- cmp plugins
use { "hrsh7th/nvim-cmp", commit = "b0dff0ec4f2748626aae13f011d1a47071fe9abc" } -- The completion plugin
use { "hrsh7th/cmp-buffer", commit = "3022dbc9166796b644a841a02de8dd1cc1d311fa" } -- buffer completions
use { "hrsh7th/cmp-path", commit = "447c87cdd6e6d6a1d2488b1d43108bfa217f56e1" } -- path completions
use { "saadparwaiz1/cmp_luasnip", commit = "a9de941bcbda508d0a45d28ae366bb3f08db2e36" } -- snippet completions
use { "hrsh7th/cmp-nvim-lsp", commit = "affe808a5c56b71630f17aa7c38e15c59fd648a8" }
use { "hrsh7th/cmp-nvim-lua", commit = "d276254e7198ab7d00f117e88e223b4bd8c02d21" }
-- snippets
use { "L3MON4D3/LuaSnip", commit = "8f8d493e7836f2697df878ef9c128337cbf2bb84" } --snippet engine
use { "rafamadriz/friendly-snippets", commit = "2be79d8a9b03d4175ba6b3d14b082680de1b31b1" } -- a bunch of snippets to use
-- LSP
-- use { "williamboman/nvim-lsp-installer", commit = "e9f13d7acaa60aff91c58b923002228668c8c9e6" } -- simple to use language server installer
use { "neovim/nvim-lspconfig", commit = "f11fdff7e8b5b415e5ef1837bdcdd37ea6764dda" } -- enable LSP
use { "williamboman/mason.nvim", commit = "c2002d7a6b5a72ba02388548cfaf420b864fbc12"}
use { "williamboman/mason-lspconfig.nvim", commit = "0051870dd728f4988110a1b2d47f4a4510213e31" }
use { "jose-elias-alvarez/null-ls.nvim", commit = "c0c19f32b614b3921e17886c541c13a72748d450" } -- for formatters and linters
use { "RRethy/vim-illuminate", commit = "a2e8476af3f3e993bb0d6477438aad3096512e42" }
-- Telescope
use { "nvim-telescope/telescope.nvim", commit = "76ea9a898d3307244dce3573392dcf2cc38f340f" }
-- Treesitter
use {
"nvim-treesitter/nvim-treesitter",
commit = "8e763332b7bf7b3a426fd8707b7f5aa85823a5ac",
}
use {
"nvim-treesitter/nvim-treesitter-context",
commit = "2f9f75d33158c0289c70cc1e0975af9d36ec16b2",
}
-- Git
use { "lewis6991/gitsigns.nvim", commit = "f98c85e7c3d65a51f45863a34feb4849c82f240f" }
-- DAP
use { "mfussenegger/nvim-dap", commit = "014ebd53612cfd42ac8c131e6cec7c194572f21d" }
use { "rcarriga/nvim-dap-ui", commit = "d76d6594374fb54abf2d94d6a320f3fd6e9bb2f7" }
use { "ravenxrz/DAPInstall.nvim", commit = "8798b4c36d33723e7bba6ed6e2c202f84bb300de" }
use { "MunifTanjim/exrc.nvim" }
use { "simrat39/rust-tools.nvim" }
use { "mfussenegger/nvim-dap-python" }
-- VimSpector
--use { "puremourning/vimspector" }
use { "j-hui/fidget.nvim", commit = "2cf9997d3bde2323a1a0934826ec553423005a26" }
-- 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)

View file

@ -1,19 +0,0 @@
local status_ok, project = pcall(require, "project_nvim")
if not status_ok then
return
end
project.setup({
-- detection_methods = { "lsp", "pattern" }, -- NOTE: lsp detection will get annoying with multiple langs in one project
detection_methods = { "pattern" },
-- patterns used to detect root dir, when **"pattern"** is in detection_methods
patterns = { ".git", "Makefile", "package.json" },
})
local tele_status_ok, telescope = pcall(require, "telescope")
if not tele_status_ok then
return
end
telescope.load_extension('projects')

View file

@ -1,25 +0,0 @@
local status_ok, telescope = pcall(require, "telescope")
if not status_ok then
return
end
local actions = require "telescope.actions"
telescope.setup {
defaults = {
prompt_prefix = "",
selection_caret = "",
path_display = { "smart" },
file_ignore_patterns = { ".git/", "node_modules" },
mappings = {
i = {
["<Down>"] = actions.cycle_history_next,
["<Up>"] = actions.cycle_history_prev,
["<C-j>"] = actions.move_selection_next,
["<C-k>"] = actions.move_selection_previous,
},
},
},
}

View file

@ -1,40 +0,0 @@
local status_ok, toggleterm = pcall(require, "toggleterm")
if not status_ok then
return
end
toggleterm.setup({
size = 20,
open_mapping = [[<c-\>]],
hide_numbers = true,
shade_terminals = true,
shading_factor = 2,
start_in_insert = true,
insert_mappings = true,
persist_size = true,
direction = "float",
close_on_exit = true,
shell = vim.o.shell,
float_opts = {
border = "curved",
},
})
function _G.set_terminal_keymaps()
local opts = {noremap = true}
-- vim.api.nvim_buf_set_keymap(0, 't', '<esc>', [[<C-\><C-n>]], opts)
vim.api.nvim_buf_set_keymap(0, 't', '<C-h>', [[<C-\><C-n><C-W>h]], opts)
vim.api.nvim_buf_set_keymap(0, 't', '<C-j>', [[<C-\><C-n><C-W>j]], opts)
vim.api.nvim_buf_set_keymap(0, 't', '<C-k>', [[<C-\><C-n><C-W>k]], opts)
vim.api.nvim_buf_set_keymap(0, 't', '<C-l>', [[<C-\><C-n><C-W>l]], opts)
end
vim.cmd('autocmd! TermOpen term://* lua set_terminal_keymaps()')
local Terminal = require("toggleterm.terminal").Terminal
local lazygit = Terminal:new({ cmd = "lazygit", hidden = true })
function _LAZYGIT_TOGGLE()
lazygit:toggle()
end

View file

@ -1,41 +0,0 @@
local status_ok, _ = pcall(require, "nvim-treesitter")
if not status_ok then
return
end
local configs
status_ok, configs = pcall(require, "nvim-treesitter.configs")
if not status_ok then
return
end
configs.setup({
ensure_installed = { "lua", "markdown", "markdown_inline", "bash", "python" }, -- put the language you want in this array
-- ensure_installed = "all", -- one of "all" or a list of languages
ignore_install = { "" }, -- List of parsers to ignore installing
sync_install = false, -- install languages synchronously (only applied to `ensure_installed`)
highlight = {
enable = true, -- false will disable the whole extension
disable = { "css" }, -- list of language that will be disabled
},
autopairs = {
enable = true,
},
indent = { enable = true, disable = { "python", "css" } },
context_commentstring = {
enable = true,
enable_autocmd = false,
},
})
local context
status_ok, context = pcall(require, "nvim-treesitter.context")
if not status_ok then
return
end
context.setup({})

View file

@ -1,5 +0,0 @@
vim.cmd [[
sign define vimspectorBP text=\ texthl=ErrorMsg
sign define vimspectorPC text=\ texthl=ErrorMsg linehl=CursorLine
sign define vimspectorPCBP text= texthl=ErrorMsg linehl=CursorLine
]]

3
stylua.toml Normal file
View file

@ -0,0 +1,3 @@
indent_type = "Spaces"
indent_width = 2
column_width = 120