Compare commits

...

67 Commits

Author SHA1 Message Date
b2d0788ede add nvim-jdtls to lazy-lock 2024-10-28 17:57:16 +01:00
268aafa494 Merge branch 'master' into jdtls 2024-10-28 17:56:20 +01:00
44b45b7c11 simply apply pwsh as shell for wsl instead of f7e7530 2024-10-24 16:42:05 +02:00
7404b85ee4 bugfix: use pwsh by explicite file extension 2024-10-22 16:40:16 +02:00
bb27e773c5 ignore excess errors on nvim-lint try_lint 2024-10-22 16:01:53 +02:00
3efbd7cbd3 added eslint for linting JS in php files 2024-10-22 15:23:26 +02:00
f7e753013c using powershell/pwsh for windows/wsl installations 2024-10-22 14:55:08 +02:00
6e8f9931e0 bugfix: remove old bdelete keymap to be replaced by vim-bbye 2024-10-22 14:50:59 +02:00
8296b55962 move plugin related settings inside plugin config for consistency 2024-10-22 14:49:39 +02:00
3c7dfc4a3e install vim-bbye to delete buffers without losing window layout 2024-10-22 14:49:15 +02:00
37bd546ea8 silently try setting language, ignore errors if already english 2024-10-21 21:09:20 +02:00
557fe18bb0 set global statusline option 2024-10-18 14:35:52 +02:00
faca7b63ce better telescope.builtin.oldfiles configuration 2024-10-17 11:58:51 +02:00
d45de7ce83 suppress errors on switch to alt-file when deleting buffer 2024-10-17 11:45:26 +02:00
cbb6693cbf add lazy-lock.json to versioning as recommended by kickstart.nvim 2024-10-17 11:45:23 +02:00
f19ae0487b specify conditions to re-enable diagnostics after git conflict 2024-10-17 11:45:20 +02:00
5febea0f8a group conflict-marker.vim autocmds in one 2024-10-17 11:44:14 +02:00
5795aa73ef use alt-file when deleting current buffer 2024-10-17 11:44:08 +02:00
444b87fd8b Merge remote-tracking branch 'modular/master' 2024-10-17 11:43:59 +02:00
Damjan 9000
c0a254f0b8 Merge 'upstream' fix: update lazy uninstall information link 2024-09-24 17:48:44 +02:00
Bastien Traverse
4120893b8a
fix: update lazy uninstall information link (#1148) 2024-09-24 11:06:14 -04:00
Damjan 9000
1695a1d3fc Merge 'upstream' feat: update references of tsserver to ts_ls 2024-09-10 22:34:43 +02:00
Nicolás Baquero
7201dc4801
feat: update references of tsserver to ts_ls (#1131) 2024-09-10 16:27:24 -04:00
Damjan 9000
3a01797417 Merge 'upstream' Fix the which-key spec issue caused by recent cleanup 2024-08-26 22:50:44 +02:00
Damjan 9000
a22976111e
Fix the which-key spec issue caused by recent cleanup (#1113)
The recent cleanup accidentally broke the leader key specs
because the spec block was in the wrong level of braces.
That resulted in which-key no longer showing the description
of the <leader> key chains such as [S]earch and others.
2024-08-26 16:43:59 -04:00
Damjan 9000
7e11e8a26b Merge 'upstream' cleanup: refactor which-key configuration 2024-08-26 22:15:38 +02:00
Ihsan Tonuzi
24d368f9ff
cleanup: refactor which-key configuration for cleaner setup (#1102)
- Moved `which-key` configuration from inline `config` to `opts` for better organization.
- Updated the key mappings setup to use `spec` for defining existing key chains.
- Removed deprecated or unnecessary comments and code.

This change aligns with updated `which-key` configuration practices, improving readability and maintainability as recommended by @VlaDexa in #1068.
2024-08-26 12:17:22 -04:00
Damjan 9000
7d83a27e60 Merge 'upstream' conform, readme, neo-tree silent
fix: remove deprecated opt for conform.nvim
Fix: updated the windows installation commands
Enable silent option for default neo-tree plugin keybinding
2024-08-26 14:52:02 +02:00
Ihsan Tonuzi
c76c323a7c
fix: remove deprecated opt for conform.nvim (#1070)
- changed lsp_fallback -> lsp_format
- updated format_on_save function to reflect change above
2024-08-25 23:28:26 -04:00
Harshit Pant
e4a5300bdb
Fix: updated the windows installation commands (#1101)
* Update README.md

* Update README.md

* Fix: updated the windows installation commands
2024-08-25 23:27:46 -04:00
Bayram Kazik
f49cc6c935
Enable silent option for default neo-tree plugin keybinding (#1108) 2024-08-25 23:23:17 -04:00
Damjan 9000
06929799f0 Merge 'upstream' Include visual mode in LSP code action keymap 2024-08-25 11:03:03 +02:00
Bayram Kazik
d452633b35
Include visual mode in LSP code action keymap (#1060) (#1064) 2024-08-24 17:31:43 -04:00
Damjan 9000
e9213469ba Merge 'upstream' refactor treesitter, which-key, uv/loop, update README
*  Ihsan Tonuzi refactor: update treesitter and which-key config
*  Michael L. Check for loop or uv for lazypath
*  Matt Gallagher Add note in README about lazy-lock.json
*  theoboldalex Update README.md
2024-08-23 14:22:13 +02:00
Ihsan Tonuzi
ac78e7d9e7
refactor: update treesitter and which-key config (#1068) 2024-08-22 21:00:39 -04:00
Michael L.
ce0c7340ff
Check for loop or uv for lazypath (#1095) 2024-08-22 16:56:33 -04:00
Matt Gallagher
554a054bf9
Add note in README about lazy-lock.json (#1090) 2024-08-22 16:53:57 -04:00
theoboldalex
c1ae9092cb
Update README.md (#1091) 2024-08-22 16:49:25 -04:00
bebfb5808f bugfix: fix path keymap to lowercase for edgecases 2024-08-20 08:42:51 +02:00
2758e420cc create keymap to access merginal plugin easier 2024-08-15 11:45:50 +02:00
8c712f86f8 install powershell_es for lsp and parser in treesitter 2024-08-15 11:38:54 +02:00
Baipyrus
48eacbfcab
Merge pull request #19 from dam9000/master
Sync fork
2024-08-15 11:35:01 +02:00
57212d3f27 comment longer overseer keymap 2024-08-07 12:23:21 +02:00
08f5acc7ed toggle additional overseer splits if window already split 2024-08-07 12:22:43 +02:00
2fec155b77 bugfix: overseer delete only empty buffer 2024-08-07 12:21:50 +02:00
cfaf706a07 delete unused void register keymaps 2024-08-07 12:21:08 +02:00
842c704a99 use quickfix instead of locations list for diagnostics 2024-08-07 12:16:39 +02:00
1d1d8447f7 added keymap to paste in terminal mode 2024-08-05 16:25:19 +02:00
689f994fbd unify layz plugin import, allow return multiple plugins per file 2024-08-01 11:29:28 +02:00
e95ecf56e6 remove rarely used AI plugin 2024-08-01 11:24:59 +02:00
9a4a5f31ae configure highlighting during plugin config 2024-08-01 11:10:08 +02:00
69c8790f6e configure keymaps during plugin config 2024-08-01 11:08:00 +02:00
15d4cfcdf7 toggle oil.nvim fullscreen window 2024-08-01 10:58:47 +02:00
12aa2d8a7b delete unused parameter in options 2024-08-01 10:50:55 +02:00
37ccad6701 show hidden files by default in oil.nvim 2024-08-01 10:50:36 +02:00
9fb7d5de4b hover documentation for function in insert mode 2024-08-01 00:23:53 +02:00
Damjan 9000
198460c421 Merge 'upstream' nvim-lspconfig cmp-nvim-lsp, treesitter prefer_git
Add explicit dependency of nvim-lspconfig on cmp-nvim-lsp
Remove treesitter prefer_git option
2024-07-31 21:09:37 +02:00
5ad7502e88 surround neovide settings with UIEnter event, helps remote connections 2024-07-31 12:04:05 +02:00
6746dd6fbe Merge remote-tracking branch 'modular/master' 2024-07-31 12:03:52 +02:00
jstrot
1860184830
Add explicit dependency of nvim-lspconfig on cmp-nvim-lsp (#1042) 2024-07-29 20:02:37 -04:00
jstrot
bb9f84ca8f
Remove treesitter prefer_git option (#1061)
- It's not safe and can corrupt other git repos
- nvim-treesiter maintainers consider `prefer_git` as deprecated and no
  longer needed.

See nvim-treesitter PR for details: https://github.com/nvim-treesitter/nvim-treesitter/pull/6959
2024-07-29 20:01:19 -04:00
Damjan 9000
0a274ab66c Merge 'upstream' refactor lazydev, defer clipboard
performance: defer clipboard because xsel and pbcopy can be slow
refactor: remove lazydev and luvit-meta as lsp dependencies
2024-07-29 20:17:53 +02:00
abeldekat
84cc12354d
performance: defer clipboard because xsel and pbcopy can be slow (#1049) 2024-07-28 17:41:34 -04:00
Ihsan Tonuzi
fd66454c4a
refactor: remove lazydev and luvit-meta as lsp dependencies (#1047) 2024-07-28 17:39:34 -04:00
Damjan 9000
5a2930fe62 Merge 'upstream' conform warning, redundant hlsearch
Modify conform comments to prevent deprecation warning when used
Remove redundant hlsearch option
2024-07-28 20:50:15 +02:00
Brandon Clark
1cef2325e0
Modify conform comments to prevent deprecation warning when used (#1057) 2024-07-28 12:43:08 -04:00
Arvin Verain
f00b2866de
Remove redundant hlsearch option (#1058) 2024-07-28 12:39:54 -04:00
22 changed files with 369 additions and 239 deletions

1
.gitignore vendored
View File

@ -4,4 +4,3 @@ test.sh
nvim nvim
spell/ spell/
lazy-lock.json

View File

@ -58,13 +58,13 @@ git clone https://github.com/Baipyrus/nvim-config.git "${XDG_CONFIG_HOME:-$HOME/
If you're using `cmd.exe`: If you're using `cmd.exe`:
```bat ```bat
git clone https://github.com/Baipyrus/nvim-config.git %localappdata%\nvim\ git clone https://github.com/Baipyrus/nvim-config.git "%localappdata%\nvim\"
``` ```
If you're using `powershell.exe` If you're using `powershell.exe`
```pwsh ```pwsh
git clone https://github.com/Baipyrus/nvim-config.git $env:LOCALAPPDATA\nvim\ git clone https://github.com/Baipyrus/nvim-config.git "${env:LOCALAPPDATA}\nvim"
``` ```
</details> </details>
@ -103,7 +103,7 @@ current plugin status. Hit `q` to close the window.
You can apply both of these approaches to any Neovim You can apply both of these approaches to any Neovim
distribution that you would like to try out. distribution that you would like to try out.
* What if I want to "uninstall" this configuration: * What if I want to "uninstall" this configuration:
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information * See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information
### Install Recipes ### Install Recipes

46
lazy-lock.json Normal file
View File

@ -0,0 +1,46 @@
{
"LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conflict-marker.vim": { "branch": "master", "commit": "62742b2ffe7a433988759c67b5c5a22eff74a14b" },
"conform.nvim": { "branch": "master", "commit": "f5bd8419f8a29451e20bdb1061a54fe13d5c8de3" },
"fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" },
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
"gitsigns.nvim": { "branch": "main", "commit": "863903631e676b33e8be2acb17512fdc1b80b4fb" },
"indent-blankline.nvim": { "branch": "master", "commit": "e7a4442e055ec953311e77791546238d1eaae507" },
"lazy.nvim": { "branch": "main", "commit": "1159bdccd8910a0fd0914b24d6c3d186689023d9" },
"lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" },
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"mini.nvim": { "branch": "main", "commit": "d4ce7d025f9c7bb4d55ebc4fd88987651e632893" },
"nvim": { "branch": "main", "commit": "7be452ee067978cdc8b2c5f3411f0c71ffa612b9" },
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
"nvim-jdtls": { "branch": "master", "commit": "efe813854432a314b472226dca813f0f2598d44a" },
"nvim-lint": { "branch": "master", "commit": "b3ab4ba88845893663d0b7122ee82921adf28358" },
"nvim-lspconfig": { "branch": "master", "commit": "541f3a2781de481bb84883889e4d9f0904250a56" },
"nvim-treesitter": { "branch": "master", "commit": "03452942dfbd998701d4123ccad2090e1bc7e9f1" },
"nvim-treesitter-context": { "branch": "master", "commit": "78a81c7494e7d1a08dd1200b556933e513fd9f29" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0d79d169fcd45a8da464727ac893044728f121d4" },
"nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" },
"oil.nvim": { "branch": "master", "commit": "39dbf875861449cf09e936fa80073f3413e9439c" },
"overseer.nvim": { "branch": "master", "commit": "6f8bc37eb729a00e185cdf38b1ed3309a05bfeef" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
"vim-bbye": { "branch": "master", "commit": "25ef93ac5a87526111f43e5110675032dbcacf56" },
"vim-flog": { "branch": "master", "commit": "6f80c1ffa7068ca8cc0e29af7af4f6ed0717e65e" },
"vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" },
"vim-lastplace": { "branch": "master", "commit": "e58cb0df716d3c88605ae49db5c4741db8b48aa9" },
"vim-merginal": { "branch": "develop", "commit": "3dca10fd8bce10edbc2024651db4ffb6dd2d89de" },
"vim-processing": { "branch": "master", "commit": "91aaa18a54f8e507e48353ba87b1eb4ecd82a17c" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
"which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" }
}

View File

@ -1,8 +0,0 @@
-- Set keymap to open chat in browser
vim.keymap.set('n', '<leader>cc', ':execute codeium#Chat()<Enter>', { desc = '[C]odeium [C]hat' })
return {
-- Free Github Copilot alternative
'Exafunction/codeium.vim',
event = 'BufEnter',
}

View File

@ -5,40 +5,38 @@ vim.g.conflict_marker_highlight_group = ''
vim.g.conflict_marker_begin = '^<<<<<<< .*$' vim.g.conflict_marker_begin = '^<<<<<<< .*$'
vim.g.conflict_marker_end = '^>>>>>>> .*$' vim.g.conflict_marker_end = '^>>>>>>> .*$'
-- Highlight groups
vim.cmd 'highlight ConflictMarkerBegin guibg=#2f7366'
vim.cmd 'highlight ConflictMarkerOurs guibg=#2e5049'
vim.cmd 'highlight ConflictMarkerTheirs guibg=#344f69'
vim.cmd 'highlight ConflictMarkerEnd guibg=#2f628e'
vim.cmd 'highlight ConflictMarkerCommonAncestorsHunk guibg=#754a81'
-- Git conflict marker management plugin -- Git conflict marker management plugin
return { return {
'rhysd/conflict-marker.vim', {
config = function() 'rhysd/conflict-marker.vim',
-- Read all lines in buffer, check if there is any conflict marker config = function()
function git_conflict_detection() -- Highlight groups
local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false) vim.cmd 'highlight ConflictMarkerBegin guibg=#2f7366'
-- Check if strict regex is contained in any line vim.cmd 'highlight ConflictMarkerOurs guibg=#2e5049'
local beginning = vim.fn.match(lines, vim.g.conflict_marker_begin) vim.cmd 'highlight ConflictMarkerTheirs guibg=#344f69'
local ending = vim.fn.match(lines, vim.g.conflict_marker_end) vim.cmd 'highlight ConflictMarkerEnd guibg=#2f628e'
local enabled = vim.diagnostic.is_enabled() vim.cmd 'highlight ConflictMarkerCommonAncestorsHunk guibg=#754a81'
if (beginning > -1 or ending > -1) and enabled then
vim.diagnostic.enable(false)
elseif not enabled then
vim.diagnostic.enable(true)
end
end
-- Autocommand to disable diagnostics on buffer enter -- Read all lines in buffer, check if there is any conflict marker
vim.api.nvim_create_autocmd('BufRead', { function git_conflict_detection()
group = vim.api.nvim_create_augroup('git-conflict-lsp-disable', { clear = true }), local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false)
callback = git_conflict_detection, -- Check if strict regex is contained in any line
}) local beginning = vim.fn.match(lines, vim.g.conflict_marker_begin)
-- Autocommand to disable diagnostics on save local ending = vim.fn.match(lines, vim.g.conflict_marker_end)
vim.api.nvim_create_autocmd('BufWritePre', { local enabled = vim.diagnostic.is_enabled()
group = vim.api.nvim_create_augroup('git-conflict-lsp-disable', { clear = false }), local conflict = beginning > -1 or ending > -1
callback = git_conflict_detection, if conflict and enabled then
}) vim.diagnostic.enable(false)
end, elseif not conflict and not enabled then
vim.diagnostic.enable(true)
end
end
-- Autocommand to disable diagnostics on buffer enter
vim.api.nvim_create_autocmd({ 'BufRead', 'BufWritePre' }, {
group = vim.api.nvim_create_augroup('git-conflict-lsp-disable', { clear = true }),
callback = git_conflict_detection,
})
end,
},
} }

View File

@ -1,23 +1,28 @@
-- Switch in fugitive.vim status window with the current one
vim.keymap.set('n', '<leader>gs', '<cmd>Gedit :<cr>', { desc = '[G]it [S]tatus' })
-- Fetch all changes
vim.keymap.set('n', '<leader>gF', '<cmd>Git fetch<cr>', { desc = '[G]it [F]etch' })
-- Push changes
vim.keymap.set('n', '<leader>gP', '<cmd>Git push<cr>', { desc = '[G]it [P]ush' })
-- Pull changes
vim.keymap.set('n', '<leader>gp', '<cmd>Git pull<cr>', { desc = '[G]it [P]ull' })
-- Open history graph
vim.keymap.set('n', '<leader>gl', '<cmd>Flogsplit<cr><cmd>wincmd k<cr><cmd>q<cr>', { desc = '[G]it [L]og' })
return { return {
-- Git related plugins {
'tpope/vim-fugitive', -- Git related plugins
dependencies = { 'tpope/vim-fugitive',
{ dependencies = {
'rbong/vim-flog', {
lazy = true, 'rbong/vim-flog',
cmd = { 'Flogsplit' }, lazy = true,
cmd = { 'Flogsplit' },
},
'idanarye/vim-merginal',
}, },
'idanarye/vim-merginal', config = function()
-- Switch in fugitive.vim status window with the current one
vim.keymap.set('n', '<leader>gs', '<cmd>Gedit :<cr>', { desc = '[G]it [S]tatus' })
-- Fetch all changes
vim.keymap.set('n', '<leader>gF', '<cmd>Git fetch<cr>', { desc = '[G]it [F]etch' })
-- Push changes
vim.keymap.set('n', '<leader>gP', '<cmd>Git push<cr>', { desc = '[G]it [P]ush' })
-- Pull changes
vim.keymap.set('n', '<leader>gp', '<cmd>Git pull<cr>', { desc = '[G]it [P]ull' })
-- Open history graph
vim.keymap.set('n', '<leader>gl', '<cmd>Flogsplit<cr><cmd>wincmd k<cr><cmd>q<cr>', { desc = '[G]it [L]og' })
-- Open branch manager
vim.keymap.set('n', '<leader>gm', '<cmd>Merginal<cr>', { desc = '[G]it [M]erginal' })
end,
}, },
} }

View File

@ -1,4 +1,6 @@
-- Plugin to intelligently reopen files at last edit position -- Plugin to intelligently reopen files at last edit position
return { return {
'farmergreg/vim-lastplace', {
'farmergreg/vim-lastplace',
},
} }

View File

@ -1,13 +1,15 @@
return { return {
-- Set lualine as statusline {
'nvim-lualine/lualine.nvim', -- Set lualine as statusline
-- See `:help lualine.txt` 'nvim-lualine/lualine.nvim',
opts = { -- See `:help lualine.txt`
options = { opts = {
icons_enabled = vim.g.have_nerd_font, options = {
theme = 'catppuccin', icons_enabled = vim.g.have_nerd_font,
section_separators = { left = '', right = '' }, theme = 'catppuccin',
component_separators = { left = '', right = '' }, section_separators = { left = '', right = '' },
component_separators = { left = '', right = '' },
},
}, },
}, },
} }

View File

@ -1,10 +1,12 @@
-- Markdown preview plugin -- Markdown preview plugin
return { return {
'iamcco/markdown-preview.nvim', {
cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' }, 'iamcco/markdown-preview.nvim',
build = 'cd app; npm install', cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' },
init = function() build = 'cd app; npm install',
vim.g.mkdp_filetypes = { 'markdown' } init = function()
end, vim.g.mkdp_filetypes = { 'markdown' }
ft = { 'markdown' }, end,
ft = { 'markdown' },
},
} }

View File

@ -1,28 +1,30 @@
-- Smooth scroll plugin and keymaps -- Smooth scroll plugin and keymaps
return { return {
'karb94/neoscroll.nvim', {
enabled = not vim.g.neovide, 'karb94/neoscroll.nvim',
config = function() enabled = not vim.g.neovide,
require('neoscroll').setup { config = function()
hide_cursor = false, require('neoscroll').setup {
easing_function = nil, hide_cursor = false,
respect_scrolloff = true, easing_function = nil,
} respect_scrolloff = true,
}
require('neoscroll.config').set_mappings { require('neoscroll.config').set_mappings {
-- Scroll normally -- Scroll normally
['<C-u>'] = { 'scroll', { '-vim.wo.scroll', 'true', '50' } }, ['<C-u>'] = { 'scroll', { '-vim.wo.scroll', 'true', '50' } },
['<C-d>'] = { 'scroll', { 'vim.wo.scroll', 'true', '50' } }, ['<C-d>'] = { 'scroll', { 'vim.wo.scroll', 'true', '50' } },
-- Scroll entire page height -- Scroll entire page height
['<C-b>'] = { 'scroll', { '-vim.api.nvim_win_get_height(0)', 'true', '80' } }, ['<C-b>'] = { 'scroll', { '-vim.api.nvim_win_get_height(0)', 'true', '80' } },
['<C-f>'] = { 'scroll', { 'vim.api.nvim_win_get_height(0)', 'true', '80' } }, ['<C-f>'] = { 'scroll', { 'vim.api.nvim_win_get_height(0)', 'true', '80' } },
-- Scroll 10% at a time -- Scroll 10% at a time
['<C-y>'] = { 'scroll', { '-0.10', 'false', '25' } }, ['<C-y>'] = { 'scroll', { '-0.10', 'false', '25' } },
['<C-e>'] = { 'scroll', { '0.10', 'false', '25' } }, ['<C-e>'] = { 'scroll', { '0.10', 'false', '25' } },
-- Jump to top, bottom and center -- Jump to top, bottom and center
['zt'] = { 'zt', { '40' } }, ['zt'] = { 'zt', { '40' } },
['zz'] = { 'zz', { '50' } }, ['zz'] = { 'zz', { '50' } },
['zb'] = { 'zb', { '40' } }, ['zb'] = { 'zb', { '40' } },
} }
end, end,
},
} }

View File

@ -1,20 +1,33 @@
-- Fix oil absolute path to relative path conversion
vim.api.nvim_create_augroup('OilRelPathFix', {})
vim.api.nvim_create_autocmd('BufLeave', {
group = 'OilRelPathFix',
pattern = 'oil:///*',
callback = function()
vim.cmd 'cd .'
end,
})
return { return {
'stevearc/oil.nvim', {
opts = {}, 'stevearc/oil.nvim',
-- Optional dependencies -- Optional dependencies
dependencies = { 'nvim-tree/nvim-web-devicons' }, dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function() config = function()
require('oil').setup() -- Fix oil absolute path to relative path conversion
vim.keymap.set('n', '<leader>fe', require('oil').open, { desc = '[F]ile [E]xplorer' }) vim.api.nvim_create_augroup('OilRelPathFix', {})
end, vim.api.nvim_create_autocmd('BufLeave', {
group = 'OilRelPathFix',
pattern = 'oil:///*',
callback = function()
vim.cmd 'cd .'
end,
})
local oil = require 'oil'
oil.setup {
view_options = {
show_hidden = true,
},
}
vim.keymap.set('n', '<leader>fe', function()
if vim.bo.filetype == 'oil' then
oil.close()
else
oil.open()
end
end, { desc = '[F]ile [E]xplorer' })
end,
},
} }

View File

@ -1,47 +1,61 @@
return { return {
-- Simple task runner plugin {
'stevearc/overseer.nvim', -- Simple task runner plugin
opts = {}, 'stevearc/overseer.nvim',
config = function() opts = {},
local overseer = require 'overseer' config = function()
overseer.setup { local overseer = require 'overseer'
templates = { overseer.setup {
'builtin', templates = {
'golang.run_project', 'builtin',
'golang.run_file', 'golang.run_project',
}, 'golang.run_file',
task_list = {
bindings = {
['<C-h>'] = false,
['<C-j>'] = false,
['<C-k>'] = false,
['<C-l>'] = false,
['q'] = false,
}, },
}, task_list = {
} bindings = {
['<C-h>'] = false,
['<C-j>'] = false,
['<C-k>'] = false,
['<C-l>'] = false,
['q'] = false,
},
},
}
-- Reference: overseer.nvim/lua/overseer/window.lua -- Reference: overseer.nvim/lua/overseer/window.lua
local function is_open() local function is_open()
for _, winid in ipairs(vim.api.nvim_tabpage_list_wins(0)) do for _, winid in ipairs(vim.api.nvim_tabpage_list_wins(0)) do
local bufnr = vim.api.nvim_win_get_buf(winid) local bufnr = vim.api.nvim_win_get_buf(winid)
if vim.bo[bufnr].filetype == 'OverseerList' then if vim.bo[bufnr].filetype == 'OverseerList' then
return true return true
end
end end
return false
end end
return false
end
-- Display status info about tasks -- Display status info about tasks
vim.keymap.set('n', '<leader>ol', function() vim.keymap.set('n', '<leader>ol', function()
overseer.toggle { winid = 0 } -- Get currently open windows (detects splits)
if is_open() then local curWindows = #vim.api.nvim_tabpage_list_wins(0)
vim.cmd.winc '_' -- Use builtin toggle if already using splits
else if curWindows ~= (is_open() and 2 or 1) then
vim.api.nvim_buf_delete(vim.api.nvim_get_current_buf(), {}) vim.cmd 'OverseerToggle'
end return
end, { desc = '[O]verseer [L]og' }) end
-- Run task by listing all in floating
vim.keymap.set('n', '<leader>or', '<cmd>OverseerRun<cr>', { desc = '[O]verseer [R]un' }) -- Otherwise, toggle overseer in fullscreen
end, overseer.toggle { winid = 0 }
local bufnr = vim.api.nvim_get_current_buf()
if is_open() then
-- Maximize height
vim.cmd.winc '_'
elseif vim.bo[bufnr].filetype == '' and vim.bo.buftype ~= 'terminal' then
-- Delete empty buffer created by overseer
vim.api.nvim_buf_delete(bufnr, {})
end
end, { desc = '[O]verseer [L]og' })
-- Run task by listing all in floating
vim.keymap.set('n', '<leader>or', '<cmd>OverseerRun<cr>', { desc = '[O]verseer [R]un' })
end,
},
} }

View File

@ -0,0 +1,8 @@
return {
{
'moll/vim-bbye',
config = function()
vim.keymap.set('n', '<leader>bd', '<cmd>Bdelete<cr>', { desc = '[B]uffer [D]elete' })
end,
},
}

View File

@ -1,15 +1,15 @@
-- [[ Basic Keymaps ]] -- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()` -- See `:help vim.keymap.set()`
-- Set highlight on search, but clear on pressing <Esc> in normal mode -- Clear highlights on search when pressing <Esc> in normal mode
vim.opt.hlsearch = true -- See `:help hlsearch`
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>') vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
-- Diagnostic keymaps -- Diagnostic keymaps
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' }) vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' })
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' }) vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' })
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' }) vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' })
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) vim.keymap.set('n', '<leader>q', vim.diagnostic.setqflist, { desc = 'Open diagnostic [Q]uickfix list' })
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier -- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
-- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping -- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping
@ -33,11 +33,6 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' }) vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
-- Delete (currently selected) text without yanking it
vim.keymap.set({ 'n', 'v' }, '<leader>dny', '"_d', { desc = '[D]elete [N]o [Y]ank' })
-- Replace currently selected text with default register without yanking it
vim.keymap.set('v', '<leader>pny', '"_dP', { desc = '[P]aste [N]o [Y]ank' })
-- Populate CMD to prepare for change directory -- Populate CMD to prepare for change directory
vim.keymap.set('n', '<leader>cd ', ':cd ', { desc = 'Prepare CMD for [C]hange [D]irectory' }) vim.keymap.set('n', '<leader>cd ', ':cd ', { desc = 'Prepare CMD for [C]hange [D]irectory' })
-- Navigate to 'base' directory, the initial dir that nvim was run in -- Navigate to 'base' directory, the initial dir that nvim was run in
@ -47,15 +42,6 @@ vim.keymap.set('n', '<leader>cdh', '<cmd>cd ' .. vim.env.HOME .. '<cr>', { desc
-- Automatically navigate to config directory -- Automatically navigate to config directory
vim.keymap.set('n', '<leader>cdn', '<cmd>cd ' .. vim.fn.stdpath 'config' .. '<cr>', { desc = '[C]hange [D]irectory to [N]eovim' }) vim.keymap.set('n', '<leader>cdn', '<cmd>cd ' .. vim.fn.stdpath 'config' .. '<cr>', { desc = '[C]hange [D]irectory to [N]eovim' })
-- Delete current buffer without closing window
vim.keymap.set('n', '<leader>bd', function()
-- Get current buffer
local buf = vim.api.nvim_get_current_buf()
-- Switch to different buffer
vim.cmd 'bp'
-- Delete saved buffer
vim.api.nvim_buf_delete(buf, {})
end, { desc = '[B]uffer [D]elete' })
-- Switch to between buffers -- Switch to between buffers
vim.keymap.set('n', '<leader>bp', '<cmd>bp<cr>', { desc = '[B]uffer [P]revious' }) vim.keymap.set('n', '<leader>bp', '<cmd>bp<cr>', { desc = '[B]uffer [P]revious' })
vim.keymap.set('n', '<leader>bn', '<cmd>bn<cr>', { desc = '[B]uffer [N]ext' }) vim.keymap.set('n', '<leader>bn', '<cmd>bn<cr>', { desc = '[B]uffer [N]ext' })
@ -125,8 +111,8 @@ vim.keymap.set({ 'n', 'v' }, '<leader>gy', global_cmd_yank, { desc = '[G]lobal c
-- Fix filename keymap -- Fix filename keymap
vim.keymap.set({ 'n', 'v' }, '<leader>fp', function() vim.keymap.set({ 'n', 'v' }, '<leader>fp', function()
-- lua print(string.gsub(vim.api.nvim_buf_get_name(0), vim.fn.getcwd(), '')) -- lua print(string.gsub(vim.api.nvim_buf_get_name(0), vim.fn.getcwd(), ''))
local cwd = vim.fn.getcwd() local cwd = vim.fn.getcwd():lower()
local path = vim.api.nvim_buf_get_name(0) local path = vim.api.nvim_buf_get_name(0):lower()
local file, _ = string.gsub(path, cwd .. '\\', '') local file, _ = string.gsub(path, cwd .. '\\', '')
vim.cmd('0f | file ' .. file) vim.cmd('0f | file ' .. file)
end, { desc = '[F]ile Fix Relative [P]ath' }) end, { desc = '[F]ile Fix Relative [P]ath' })
@ -137,6 +123,8 @@ if vim.g.neovide then
vim.keymap.set({ 'n', 'v' }, '<C-S-v>', '"+p', { desc = 'Paste from System clipboard' }) vim.keymap.set({ 'n', 'v' }, '<C-S-v>', '"+p', { desc = 'Paste from System clipboard' })
-- Clipboard for command and insert mode -- Clipboard for command and insert mode
vim.keymap.set({ 'c', 'i' }, '<C-S-v>', '<C-R>+', { desc = 'Paste from System clipboard' }) vim.keymap.set({ 'c', 'i' }, '<C-S-v>', '<C-R>+', { desc = 'Paste from System clipboard' })
-- Clipboard for terminal mode
vim.keymap.set({ 't' }, '<C-S-v>', '<C-\\><C-n>"+pi', { desc = 'Paste from System clipboard' })
end end
-- [[ Basic Autocommands ]] -- [[ Basic Autocommands ]]

View File

@ -7,7 +7,7 @@ return {
{ {
'<leader>fb', '<leader>fb',
function() function()
require('conform').format { async = true, lsp_fallback = true } require('conform').format { async = true, lsp_format = 'fallback' }
end, end,
mode = '', mode = '',
desc = '[F]ormat [B]uffer', desc = '[F]ormat [B]uffer',
@ -20,9 +20,15 @@ return {
-- have a well standardized coding style. You can add additional -- have a well standardized coding style. You can add additional
-- languages here or re-enable it for the disabled ones. -- languages here or re-enable it for the disabled ones.
local disable_filetypes = { c = true, cpp = true, php = true } local disable_filetypes = { c = true, cpp = true, php = true }
local lsp_format_opt
if disable_filetypes[vim.bo[bufnr].filetype] then
lsp_format_opt = 'never'
else
lsp_format_opt = 'fallback'
end
return { return {
timeout_ms = 500, timeout_ms = 500,
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype], lsp_format = lsp_format_opt,
} }
end, end,
formatters_by_ft = { formatters_by_ft = {
@ -30,9 +36,8 @@ return {
-- Conform can also run multiple formatters sequentially -- Conform can also run multiple formatters sequentially
python = { 'isort', 'black' }, python = { 'isort', 'black' },
-- You can use a sub-list to tell conform to run *until* a formatter -- You can use 'stop_after_first' to run the first available formatter from the list
-- is found. javascript = { 'prettierd', 'prettier', stop_after_first = true },
javascript = { { 'prettierd', 'prettier' } },
}, },
}, },
}, },

View File

@ -8,6 +8,7 @@ return {
lint.linters_by_ft = { lint.linters_by_ft = {
javascript = { 'eslint' }, javascript = { 'eslint' },
typescript = { 'eslint' }, typescript = { 'eslint' },
php = { 'eslint' },
markdown = { 'markdownlint' }, markdown = { 'markdownlint' },
} }
@ -17,7 +18,7 @@ return {
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, { vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
group = lint_augroup, group = lint_augroup,
callback = function() callback = function()
lint.try_lint() lint.try_lint(nil, { ignore_errors = true })
end, end,
}) })
end, end,

View File

@ -1,5 +1,20 @@
-- LSP Plugins
return { return {
{ -- LSP Configuration & Plugins {
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis
'folke/lazydev.nvim',
ft = 'lua',
opts = {
library = {
-- Load luvit types when the `vim.uv` word is found
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
},
},
},
{ 'Bilal2453/luvit-meta', lazy = true },
{
-- Main LSP Configuration
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',
dependencies = { dependencies = {
-- Automatically install LSPs and related tools to stdpath for Neovim -- Automatically install LSPs and related tools to stdpath for Neovim
@ -12,19 +27,8 @@ return {
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ 'j-hui/fidget.nvim', opts = {} }, { 'j-hui/fidget.nvim', opts = {} },
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins -- Allows extra capabilities provided by nvim-cmp
-- used for completion, annotations and signatures of Neovim apis 'hrsh7th/cmp-nvim-lsp',
{
'folke/lazydev.nvim',
ft = 'lua',
opts = {
library = {
-- Load luvit types when the `vim.uv` word is found
{ path = 'luvit-meta/library', words = { 'vim%.uv' } },
},
},
},
{ 'Bilal2453/luvit-meta', lazy = true },
}, },
config = function() config = function()
-- Brief aside: **What is LSP?** -- Brief aside: **What is LSP?**
@ -64,8 +68,9 @@ return {
-- --
-- In this case, we create a function that lets us more easily define mappings specific -- In this case, we create a function that lets us more easily define mappings specific
-- for LSP related items. It sets the mode, buffer and description for us each time. -- for LSP related items. It sets the mode, buffer and description for us each time.
local map = function(keys, func, desc) local map = function(keys, func, desc, mode)
vim.keymap.set('n', keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc }) mode = mode or 'n'
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
end end
-- Jump to the definition of the word under your cursor. -- Jump to the definition of the word under your cursor.
@ -102,11 +107,13 @@ return {
-- Execute a code action, usually your cursor needs to be on top of an error -- Execute a code action, usually your cursor needs to be on top of an error
-- or a suggestion from your LSP for this to activate. -- or a suggestion from your LSP for this to activate.
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction') map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' })
-- Opens a popup that displays documentation about the word under your cursor -- Opens a popup that displays documentation about the word under your cursor
-- See `:help K` for why this keymap. -- See `:help K` for why this keymap.
map('K', vim.lsp.buf.hover, 'Hover Documentation') map('K', vim.lsp.buf.hover, 'Hover Documentation')
-- Similar as above, shows hover documentation for current function
vim.keymap.set('i', '<C-k>', vim.lsp.buf.signature_help, { buffer = event.buf, desc = 'LSP: ' .. 'Hover Signature Information' })
-- WARN: This is not Goto Definition, this is Goto Declaration. -- WARN: This is not Goto Definition, this is Goto Declaration.
-- For example, in C this would take you to the header. -- For example, in C this would take you to the header.
@ -170,12 +177,13 @@ return {
-- - settings (table): Override the default settings passed when initializing the server. -- - settings (table): Override the default settings passed when initializing the server.
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local servers = { local servers = {
powershell_es = {},
rust_analyzer = {}, rust_analyzer = {},
tailwindcss = {}, tailwindcss = {},
omnisharp = {}, omnisharp = {},
tsserver = {},
pyright = {}, pyright = {},
svelte = {}, svelte = {},
ts_ls = {},
gopls = {}, gopls = {},
intelephense = {}, intelephense = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
@ -308,7 +316,7 @@ return {
local server = servers[server_name] or {} local server = servers[server_name] or {}
-- This handles overriding only values explicitly passed -- This handles overriding only values explicitly passed
-- by the server configuration above. Useful when disabling -- by the server configuration above. Useful when disabling
-- certain features of an LSP (for example, turning off formatting for tsserver) -- certain features of an LSP (for example, turning off formatting for ts_ls)
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {}) server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
require('lspconfig')[server_name].setup(server) require('lspconfig')[server_name].setup(server)
end, end,

View File

@ -111,8 +111,12 @@ return {
vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' }) vim.keymap.set('n', '<leader>sw', builtin.grep_string, { desc = '[S]earch current [W]ord' })
vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' }) vim.keymap.set('n', '<leader>sg', builtin.live_grep, { desc = '[S]earch by [G]rep' })
vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' }) vim.keymap.set('n', '<leader>sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' })
vim.keymap.set('n', '<leader>sr', builtin.resume, { desc = '[S]earch [R]esume' }) vim.keymap.set('n', '<leader>sr', function()
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) builtin.oldfiles {
only_cwd = true,
}
end, { desc = '[S]earch [R]ecent Files in CWD' })
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, { desc = '[S]earch Recent Global Files' })
vim.keymap.set('n', '<leader>sc', builtin.command_history, { desc = '[S]earch [C]ommand History' }) vim.keymap.set('n', '<leader>sc', builtin.command_history, { desc = '[S]earch [C]ommand History' })
vim.keymap.set('n', '<leader><leader>', function() vim.keymap.set('n', '<leader><leader>', function()
builtin.buffers { builtin.buffers {

View File

@ -6,6 +6,8 @@ return {
'nvim-treesitter/nvim-treesitter-textobjects', 'nvim-treesitter/nvim-treesitter-textobjects',
}, },
build = ':TSUpdate', build = ':TSUpdate',
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
opts = { opts = {
ensure_installed = { ensure_installed = {
-- kickstart -- kickstart
@ -30,6 +32,7 @@ return {
'rust', 'rust',
'c_sharp', 'c_sharp',
'go', 'go',
'powershell',
-- git -- git
'gitcommit', 'gitcommit',
'gitignore', 'gitignore',
@ -102,14 +105,6 @@ return {
}, },
}, },
}, },
config = function(_, opts)
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
-- Prefer git instead of curl in order to improve connectivity in some environments
require('nvim-treesitter.install').prefer_git = true
---@diagnostic disable-next-line: missing-fields
require('nvim-treesitter.configs').setup(opts)
end,
}, },
} }
-- vim: ts=2 sts=2 sw=2 et -- vim: ts=2 sts=2 sw=2 et

View File

@ -17,12 +17,49 @@ return {
{ -- Useful plugin to show you pending keybinds. { -- Useful plugin to show you pending keybinds.
'folke/which-key.nvim', 'folke/which-key.nvim',
event = 'VimEnter', -- Sets the loading event to 'VimEnter' event = 'VimEnter', -- Sets the loading event to 'VimEnter'
config = function() -- This is the function that runs, AFTER loading opts = {
require('which-key').setup() icons = {
-- set icon mappings to true if you have a Nerd Font
mappings = vim.g.have_nerd_font,
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
-- default whick-key.nvim defined Nerd Font icons, otherwise define a string table
keys = vim.g.have_nerd_font and {} or {
Up = '<Up> ',
Down = '<Down> ',
Left = '<Left> ',
Right = '<Right> ',
C = '<C-…> ',
M = '<M-…> ',
D = '<D-…> ',
S = '<S-…> ',
CR = '<CR> ',
Esc = '<Esc> ',
ScrollWheelDown = '<ScrollWheelDown> ',
ScrollWheelUp = '<ScrollWheelUp> ',
NL = '<NL> ',
BS = '<BS> ',
Space = '<Space> ',
Tab = '<Tab> ',
F1 = '<F1>',
F2 = '<F2>',
F3 = '<F3>',
F4 = '<F4>',
F5 = '<F5>',
F6 = '<F6>',
F7 = '<F7>',
F8 = '<F8>',
F9 = '<F9>',
F10 = '<F10>',
F11 = '<F11>',
F12 = '<F12>',
},
},
-- Document existing key chains -- Document existing key chains
require('which-key').add { spec = {
{ '<leader>c', group = '[C]ode-/[C]hange' }, { '<leader>c', group = '[C]ode-/[C]hange' },
{ '<leader>d', group = '[D]ocument/[D]elete', mode = { 'n', 'v' } }, { '<leader>c', group = '[C]ode', mode = { 'x' } },
{ '<leader>d', group = '[D]ocument' },
{ '<leader>r', group = '[R]ename' }, { '<leader>r', group = '[R]ename' },
{ '<leader>s', group = '[S]earch' }, { '<leader>s', group = '[S]earch' },
{ '<leader>w', group = '[W]orkspace' }, { '<leader>w', group = '[W]orkspace' },
@ -31,14 +68,11 @@ return {
{ '<leader>g', group = '[G]it/[G]lobal', mode = { 'n', 'v' } }, { '<leader>g', group = '[G]it/[G]lobal', mode = { 'n', 'v' } },
{ '<leader>b', group = '[B]uffer/[B]reakpoint' }, { '<leader>b', group = '[B]uffer/[B]reakpoint' },
{ '<leader>cd', group = '[D]irectory' }, { '<leader>cd', group = '[D]irectory' },
{ '<leader>dn', group = '[N]o', mode = { 'n', 'v' } },
{ '<leader>l', group = '[L]ist', mode = { 'n', 'v' } }, { '<leader>l', group = '[L]ist', mode = { 'n', 'v' } },
{ '<leader>f', group = '[F]ormat/[F]ile', mode = { 'n', 'v' } }, { '<leader>f', group = '[F]ormat/[F]ile', mode = { 'n', 'v' } },
{ '<leader>o', group = '[O]verseer', mode = { 'n', 'v' } }, { '<leader>o', group = '[O]verseer', mode = { 'n', 'v' } },
{ '<leader>p', group = '[P]aste', mode = { 'v' } }, },
{ '<leader>pn', group = '[N]o', mode = { 'v' } }, },
}
end,
}, },
} }
-- vim: ts=2 sts=2 sw=2 et -- vim: ts=2 sts=2 sw=2 et

View File

@ -1,7 +1,7 @@
-- [[ Install `lazy.nvim` plugin manager ]] -- [[ Install `lazy.nvim` plugin manager ]]
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info -- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim' local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not vim.uv.fs_stat(lazypath) then if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = 'https://github.com/folke/lazy.nvim.git' local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
local out = vim.fn.system { local out = vim.fn.system {
'git', 'git',

View File

@ -4,12 +4,12 @@
-- For more options, you can see `:help option-list` -- For more options, you can see `:help option-list`
-- Set display language -- Set display language
vim.cmd('language en_US', {}) vim.cmd 'silent! language en_US'
-- Shell options -- Shell options
-- Sets the shell to use for system() and ! commands in windows -- Sets the shell to use for system() and ! commands in windows and wsl
if vim.fn.has 'win32' == 1 and vim.fn.has 'wsl' == 0 then if vim.fn.has 'win32' == 1 or vim.fn.has 'wsl' == 1 then
vim.opt.shell = vim.fn.executable 'pwsh' == 1 and 'pwsh' or 'powershell' vim.opt.shell = vim.fn.executable 'pwsh.exe' == 1 and 'pwsh.exe' or 'powershell.exe'
vim.opt.shellcmdflag = '-NoLogo -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;' vim.opt.shellcmdflag = '-NoLogo -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;'
vim.opt.shellredir = '-RedirectStandardOutput %s -NoNewWindow -Wait' vim.opt.shellredir = '-RedirectStandardOutput %s -NoNewWindow -Wait'
vim.opt.shellpipe = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode' vim.opt.shellpipe = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode'
@ -38,9 +38,12 @@ vim.opt.mouse = 'a'
vim.opt.showmode = false vim.opt.showmode = false
-- Sync clipboard between OS and Neovim. -- Sync clipboard between OS and Neovim.
-- Schedule the setting after `UiEnter` because it can increase startup-time.
-- Remove this option if you want your OS clipboard to remain independent. -- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'` -- See `:help 'clipboard'`
vim.opt.clipboard = 'unnamedplus' vim.schedule(function()
vim.opt.clipboard = 'unnamedplus'
end)
-- Enable break indent -- Enable break indent
vim.opt.breakindent = true vim.opt.breakindent = true
@ -89,12 +92,21 @@ vim.opt.sidescrolloff = 12
-- Set cursor pointer to block -- Set cursor pointer to block
vim.opt.guicursor = 'n-v-i-c:block-Cursor' vim.opt.guicursor = 'n-v-i-c:block-Cursor'
-- Options specifically targeted at Neovide -- Set global statusline
if vim.g.neovide then vim.o.laststatus = 3
vim.o.guifont = 'CaskaydiaCove Nerd Font Mono:h14' vim.api.nvim_set_hl(0, 'WinSeparator', { bg = nil })
vim.g.neovide_hide_mouse_when_typing = true
vim.g.neovide_cursor_animation_length = 0 vim.api.nvim_create_autocmd('UIEnter', {
vim.g.neovide_cursor_trail_length = 0 group = vim.api.nvim_create_augroup('SetGUISettings', { clear = true }),
end callback = function()
-- Options specifically targeted at Neovide
if vim.g.neovide then
vim.o.guifont = 'CaskaydiaCove Nerd Font Mono:h14'
vim.g.neovide_hide_mouse_when_typing = true
vim.g.neovide_cursor_animation_length = 0
vim.g.neovide_cursor_trail_length = 0
end
end,
})
-- vim: ts=2 sts=2 sw=2 et -- vim: ts=2 sts=2 sw=2 et