Compare commits
433 Commits
Author | SHA1 | Date | |
---|---|---|---|
80e3c762f5 | |||
44376422e0 | |||
851238e0b9 | |||
a5b0466f17 | |||
eb87655ced | |||
99008719e2 | |||
f77d8674be | |||
3dfbd9b8b6 | |||
62ffea7b57 | |||
148a870385 | |||
9207bbe62a | |||
d1900be2af | |||
c72644682d | |||
4665a3b753 | |||
5819910aee | |||
df73cb06c6 | |||
fcd0795561 | |||
6879b11ffa | |||
2ed815894f | |||
476c83e7a8 | |||
90494dfad6 | |||
6b020335df | |||
5f17610dbf | |||
5542c5b564 | |||
bbdfe3d6e8 | |||
903112b0bb | |||
a11811019c | |||
8b373ff24f | |||
03e2166f57 | |||
8bd2e43052 | |||
e725e4deee | |||
f5f903620f | |||
7c8bf66b37 | |||
e8f5e62439 | |||
a94b098588 | |||
4ee5f69566 | |||
a0086b4380 | |||
0139368180 | |||
63ff84fae1 | |||
1e15ac6637 | |||
170aa9c79f | |||
56357acccf | |||
506583b78a | |||
04c9200050 | |||
9e8d143b24 | |||
849cb2a2c7 | |||
3324cb1fff | |||
ebefdb64ff | |||
3e49aa40a5 | |||
6e3a2f931c | |||
4240bd1bde | |||
8f6caa96e5 | |||
97c469b1ef | |||
70a06005fe | |||
dcf6d687b8 | |||
eca6376d79 | |||
33e497133c | |||
bc278c2a62 | |||
99690477af | |||
5b4001d7e8 | |||
02aa672af8 | |||
480b9c5db1 | |||
91faa6b627 | |||
2670f4f656 | |||
7a2c6ecd29 | |||
656ff601a3 | |||
2b592e82ad | |||
a15e7cba84 | |||
d62c914ea5 | |||
1792e54500 | |||
b9cf3aadef | |||
b87bbaee74 | |||
fa0d4ffd8f | |||
c60cf314be | |||
2b0d14d7a1 | |||
7bdf105fac | |||
045a1af8dc | |||
c911f288c6 | |||
c81d9e0bda | |||
561b99ac1b | |||
cfa7b243f3 | |||
6c51bce00d | |||
a7a4319243 | |||
4565a3aabd | |||
413a11e741 | |||
b4e5f2b7b4 | |||
70d6dbda37 | |||
100b358acb | |||
c5e740a70b | |||
7f00267ec8 | |||
9e8672038e | |||
4f5bd49e70 | |||
7d318b2512 | |||
beba8b3c51 | |||
e2c55680ee | |||
a5ceececb5 | |||
ec07710b24 | |||
b9c4ea5413 | |||
520858f6ac | |||
2b48e24a28 | |||
ee1033a856 | |||
1983373ba0 | |||
f2f51655a0 | |||
8de574df32 | |||
ed78b61632 | |||
35552af831 | |||
874cb95f01 | |||
2d3f05b6be | |||
06b46caf29 | |||
42fb43f54b | |||
b35136bae4 | |||
5a1a8e8f3e | |||
78cbde972f | |||
e3c8a5ddd4 | |||
c8e1906f22 | |||
4aa3048e23 | |||
3a70a67737 | |||
2c57a134e3 | |||
0c5f81d6d4 | |||
54e87b448e | |||
1e7fd727c2 | |||
b6e811ab23 | |||
98d3f5cac7 | |||
b0918760d4 | |||
9055e4e876 | |||
4916c4eca2 | |||
ce61facff9 | |||
fd16ef223a | |||
5dd99d7085 | |||
9361934d8a | |||
4f0bab54b5 | |||
e562f3b996 | |||
17b3f53e11 | |||
c136b87b7b | |||
1adb3c8ff2 | |||
b7167a3a47 | |||
62734cac5c | |||
fa41d32ae1 | |||
c52f6304d4 | |||
e1e32cf52c | |||
a62b9ca215 | |||
6b9089ee85 | |||
8fb7e9ad0a | |||
738bcabefe | |||
dc534b5a38 | |||
51183ffd55 | |||
58ae25ee12 | |||
1d9f94e650 | |||
5d7231efa2 | |||
1d436a3df7 | |||
b91b0b48b4 | |||
15f8c3ecf7 | |||
d7705f1dec | |||
74c87cee88 | |||
8fa2f0f0e1 | |||
49edb9e202 | |||
2d5f71805e | |||
45ea60d689 | |||
186052c31a | |||
11b954ff33 | |||
bce0373dfb | |||
e111deabc9 | |||
c5073fe73e | |||
62a276a336 | |||
a188cf2c9f | |||
64f65a1d57 | |||
814ebfa3ce | |||
cdd13eeccc | |||
f638d730ad | |||
c0dc96fd9d | |||
3546f84367 | |||
8ef35063dd | |||
0fcdf98cf3 | |||
78544dcdbf | |||
d8dee9c878 | |||
fa5c5f32a4 | |||
4c3fce3ba2 | |||
8f26b25bef | |||
e93e47bd69 | |||
2ff32c06fd | |||
fb5373f0a7 | |||
0b17bf0cfb | |||
11140c602e | |||
c8f9050caf | |||
51eab5c6ea | |||
9c86c2a32e | |||
9b8097dc36 | |||
15b03ee11f | |||
4b3bc84837 | |||
861b60e4f7 | |||
ff7a190162 | |||
a2f360ddb4 | |||
66477e10a0 | |||
c8bbbe4057 | |||
f7536e94ae | |||
a09b75f16e | |||
56797a2564 | |||
a64aeb9dd6 | |||
350d42333a | |||
45f61cf7fe | |||
4b532e698f | |||
9fc33c2b44 | |||
474fe4cb44 | |||
ea267d690f | |||
c23240ab03 | |||
8c672f19db | |||
476205ce47 | |||
837a273774 | |||
3d0b66c7ab | |||
0dfcf42beb | |||
8ea3ed7a79 | |||
518f32d3bb | |||
db1ad041ab | |||
76249b2a8a | |||
e2460a2425 | |||
5b6ae54763 | |||
3272e4067f | |||
1e8201cd13 | |||
7629d6d57e | |||
d0c31ea3b7 | |||
570b9fe329 | |||
739b2154eb | |||
edc73d3639 | |||
d91ae17970 | |||
f9d34430ae | |||
74e6cc3bb4 | |||
7e31d668ee | |||
4bbf17633d | |||
a7a5a41f8d | |||
a3942972d8 | |||
ea6e95aca8 | |||
67067bde77 | |||
d3e3bbc903 | |||
dbfd744f97 | |||
b4d08255a5 | |||
827adacc68 | |||
89b1d53451 | |||
4ba64948eb | |||
48acab5f4b | |||
0115553f37 | |||
a85b634110 | |||
a24b928433 | |||
4c9b016540 | |||
e32ff73562 | |||
774fdda969 | |||
612ec0cbe6 | |||
c19072c4cd | |||
e72eaa724e | |||
e6d1091430 | |||
59d9b95eb9 | |||
ebd55ecc55 | |||
41ce8f2063 | |||
652a1c2aa7 | |||
988db59976 | |||
54e6d1b844 | |||
bf80f95a9a | |||
99e1139337 | |||
382871be03 | |||
1ba7731c16 | |||
4a21802429 | |||
087e0faad2 | |||
14fd19bde6 | |||
8030c44a93 | |||
49f8494072 | |||
69b5cace69 | |||
5a22a03eba | |||
c9c630ce61 | |||
c792c0839b | |||
80cff42519 | |||
d019626efb | |||
8953d89f3c | |||
860b97c24c | |||
deb6dea93b | |||
b396169fca | |||
6a8c84250f | |||
894dba3337 | |||
8ebf953ec7 | |||
3aea401281 | |||
98a9f00bd6 | |||
03c102be95 | |||
3b3bc5b937 | |||
5d4cf9bfdc | |||
219a8c3e81 | |||
d7b2cc3156 | |||
f9888e9c2a | |||
8b79b38ca0 | |||
d6f71c8ab2 | |||
23a3a8f7c6 | |||
d525388f3f | |||
4bd385dd55 | |||
f9d9bbd258 | |||
c607af6115 | |||
b12a673ba1 | |||
3c9ecc9d53 | |||
be42757e5e | |||
8020639f31 | |||
ec56132c85 | |||
3392ebe270 | |||
ad480c4d35 | |||
49bb25aec6 | |||
c27b582b89 | |||
9e2890aed9 | |||
0a31d71c0c | |||
7b776c7e9f | |||
1f60a85098 | |||
688493d39d | |||
b099ba7efd | |||
0c66846e4e | |||
d609883ff7 | |||
5ad1c4be90 | |||
5f357b0db5 | |||
0a60ff63bd | |||
a1bff62966 | |||
3a0e386252 | |||
37b7a68c45 | |||
607245c47d | |||
2c277ee846 | |||
37d7e60eef | |||
2951e86e06 | |||
228171561f | |||
b1754cf7db | |||
1f8ef76f81 | |||
9b4fcca0ce | |||
d9f90a1f4b | |||
5b4878f76d | |||
c6d9e5b891 | |||
b31bd343fa | |||
c6bdb676aa | |||
2bdc01b56f | |||
6eba3c6f3a | |||
3b66cc0b3c | |||
db6d89471c | |||
892ac617ee | |||
c54a515556 | |||
20cb51e2b5 | |||
d6930cbb2f | |||
76a7aad423 | |||
c921ae0f4f | |||
8db95a1880 | |||
4a6de72626 | |||
6c8531b67a | |||
e34744b677 | |||
8cafa90c01 | |||
2da1322e7f | |||
c65f2c543b | |||
7bd0f10847 | |||
2c4617f462 | |||
5dde3be206 | |||
4fbe1c4174 | |||
d7b49c4c4b | |||
8a000f811c | |||
7f99415c02 | |||
257d2fffcf | |||
3dc493ff7e | |||
651d1d0d2f | |||
579cdff054 | |||
96e1f3f6ed | |||
99e257dbc1 | |||
f0f1c35740 | |||
2425d5f29d | |||
ab1de6c1de | |||
595a4d287b | |||
641d2e0c9e | |||
1c10794866 | |||
204f38c947 | |||
ee3b97648a | |||
4462d4af5c | |||
f307fb2124 | |||
d23279a4a4 | |||
8220799933 | |||
752814db02 | |||
d57067ea70 | |||
198141f63f | |||
018c25d0d7 | |||
04d69955d7 | |||
434611abf4 | |||
f9d0bf5366 | |||
479c8686eb | |||
aa7bc38af6 | |||
e3a6774b76 | |||
d219e43cc7 | |||
cb2b0e521f | |||
c3deaa45c6 | |||
4c543d7f44 | |||
8860d92ed1 | |||
a3d76bbd15 | |||
a1d6d33b34 | |||
fbdad999cd | |||
cf9b76d0e0 | |||
c0aa5e03d0 | |||
86b8b65c99 | |||
61a052b960 | |||
7e1182a11b | |||
d1b14f05c1 | |||
961ec74fbd | |||
f8ff3b647f | |||
79486cd892 | |||
da4f4674a5 | |||
4a076eacd9 | |||
7e40d7732f | |||
b259a2ae23 | |||
c643e834e0 | |||
ff41531888 | |||
3a700044c4 | |||
3209e01c99 | |||
9bf991c537 | |||
b8bca37446 | |||
86b5aeb691 | |||
464644246c | |||
6689c9b523 | |||
4c5aa10996 | |||
29b32edada | |||
667e42fe57 | |||
4dd3918382 | |||
bec752c6b7 | |||
ab444ed7d9 | |||
bd3af2a9a4 | |||
e72fa7324b | |||
577a3cd1a7 | |||
0d93bc8fa5 | |||
9325519929 | |||
71321b1d16 | |||
faeea7fb5f | |||
5c4e7a4000 | |||
cfff367b83 | |||
25a5283cd6 | |||
3f9a7f38fb | |||
0e13e43fc3 | |||
0e92584aaf | |||
b7020671d7 | |||
31ca3a6d00 | |||
8fabdb2d07 | |||
6db33686b5 |
71
.clangd
Normal file
71
.clangd
Normal file
@ -0,0 +1,71 @@
|
||||
Diagnostics:
|
||||
UnusedIncludes: Strict
|
||||
ClangTidy:
|
||||
Add:
|
||||
- cppcoreguidelines-*
|
||||
- clang-analyzer-core.*
|
||||
- bugprone-assert-side-effect
|
||||
- bugprone-branch-clone
|
||||
- bugprone-copy-constructor-init
|
||||
- bugprone-exception-escape
|
||||
- bugprone-forward-declaration-namespace
|
||||
- bugprone-incorrect-roundings
|
||||
- bugprone-infinite-loop
|
||||
- bugprone-integer-division
|
||||
- bugprone-macro-parentheses
|
||||
- bugprone-multiple-statement-macro
|
||||
- bugprone-parent-virtual-call
|
||||
- bugprone-redundant-branch-condition
|
||||
- bugprone-reserved-identifier
|
||||
- bugprone-sizeof-container
|
||||
- bugprone-sizeof-expression
|
||||
- bugprone-string-constructor
|
||||
- bugprone-string-integer-assignment
|
||||
- bugprone-suspicious-enum-usage
|
||||
- bugprone-suspicious-include
|
||||
- bugprone-suspicious-missing-comma
|
||||
- bugprone-suspicious-semicolon
|
||||
- bugprone-swapped-arguments
|
||||
- bugprone-terminating-continue
|
||||
- bugprone-too-small-loop-variable
|
||||
- llvm-namespace-comment
|
||||
- misc-definitions-in-headers
|
||||
- misc-redundant-expression
|
||||
- misc-unused-parameters
|
||||
- hicpp-signed-bitwise
|
||||
- readability-identifier-naming
|
||||
- readability-duplicate-include
|
||||
- readability-braces-around-statements
|
||||
- readability-implicit-bool-conversion
|
||||
- readability-inconsistent-declaration-parameter-name
|
||||
- readability-make-member-function-const
|
||||
- readability-misleading-indentation
|
||||
- readability-redundant-declaration
|
||||
- readability-redundant-preprocessor
|
||||
- readability-redundant-member-init
|
||||
- readability-simplify-boolean-expr
|
||||
- readability-static-accessed-through-instance
|
||||
- readability-uppercase-literal-suffix
|
||||
Remove:
|
||||
- readability-avoid-const-params-in-decls
|
||||
- readability-function-cognitive-complexity
|
||||
- readability-magic-numbers
|
||||
- readability-identifier-length
|
||||
- cppcoreguidelines-explicit-virtual-functions
|
||||
- cppcoreguidelines-init-variables
|
||||
- cppcoreguidelines-non-private-member-variables-in-classes
|
||||
- cppcoreguidelines-avoid-magic-numbers
|
||||
- cppcoreguidelines-owning-memory
|
||||
- cppcoreguidelines-pro-bounds-constant-array-index
|
||||
- cppcoreguidelines-special-member-functions
|
||||
- cppcoreguidelines-avoid-c-arrays
|
||||
- cppcoreguidelines-pro-type-reinterpret-cast
|
||||
CheckOptions:
|
||||
readability-identifier-naming.FunctionCase: camelBack
|
||||
readability-identifier-naming.NamespaceCase: lower_case
|
||||
readability-identifier-naming.ClassCase: CamelCase
|
||||
readability-identifier-naming.PrivateMemberPrefix: m_
|
||||
readability-identifier-naming.StructCase: CamelCase
|
||||
readability-identifier-naming.VariableCase: camelBack
|
||||
readability-identifier-naming.GlobalConstantCase: UPPER_CASE
|
||||
readability-identifier-naming.EnumConstant: UPPER_CASE
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -5,3 +5,6 @@ vim.bundle
|
||||
plugged
|
||||
rplugin.vim
|
||||
plugin/packer_compiled.lua
|
||||
venv_debugpy
|
||||
.luarc.json
|
||||
.luarc.json
|
||||
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
|
||||
"Lua.diagnostics.disable": ["undefined-global"]
|
||||
}
|
||||
|
140
init.lua
140
init.lua
@ -1,135 +1,7 @@
|
||||
local cmd = vim.cmd -- to execute Vim commands e.g. cmd('pwd')
|
||||
local fn = vim.fn -- to call Vim functions e.g. fn.bufnr()
|
||||
local g = vim.g -- a table to access global variables
|
||||
local opt = vim.opt -- to set options
|
||||
local utils = require('utils')
|
||||
|
||||
-------------------- PACKER --------------------------------
|
||||
-- Auto install packer.nvim if not exists
|
||||
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||
vim.cmd 'packadd packer.nvim'
|
||||
vim.g.mapleader = ','
|
||||
if not vim.g.vscode then
|
||||
require('config.lazy')
|
||||
require('my_keymappings')
|
||||
require('my_autocommands')
|
||||
require('config.options')
|
||||
end
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
-------------------- EXTERNAL ------------------------------
|
||||
require('my_plugins')
|
||||
require('my_keymappings')
|
||||
require('my_options')
|
||||
require("my_autocommands")
|
||||
|
||||
-- plugins
|
||||
require('my_telescope')
|
||||
require('my_lspinstall')
|
||||
require('my_cmp')
|
||||
-------------------- TREE-SITTER ---------------------------
|
||||
require('nvim-treesitter.configs').setup({
|
||||
ensure_installed = 'maintained',
|
||||
highlight = {
|
||||
enable = true
|
||||
}
|
||||
})
|
||||
-------------------- GITSIGNS ------------------------------
|
||||
require('gitsigns').setup()
|
||||
-------------------- NVIM-TREE -----------------------------
|
||||
require('nvim-tree').setup({
|
||||
auto_close = true,
|
||||
update_cwd = true,
|
||||
update_to_buf_dir = {
|
||||
-- enable the feature
|
||||
enable = true,
|
||||
-- allow to open the tree if it was previously closed
|
||||
auto_open = false,
|
||||
},
|
||||
update_focused_file = {
|
||||
enable = true,
|
||||
update_cwd = false,
|
||||
ignore_list = {}
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
icons = {
|
||||
hint = "",
|
||||
info = "",
|
||||
warning = "",
|
||||
error = "",
|
||||
}
|
||||
},
|
||||
})
|
||||
utils.map('n', '<leader>tt', '<cmd>NvimTreeToggle<CR>')
|
||||
g.nvim_tree_highlight_opened_files = 1
|
||||
g.nvim_tree_respect_buf_cwd = 1
|
||||
-------------------- COMMENTED -----------------------------
|
||||
require('Comment').setup({
|
||||
toggler = {
|
||||
---line-comment toggle
|
||||
line = '<leader>cc',
|
||||
},
|
||||
opleader = {
|
||||
---line-comment opfunc mapping
|
||||
line = '<leader>c',
|
||||
},
|
||||
})
|
||||
-------------------- CMAKE ---------------------------------
|
||||
require('telescope').load_extension('cmake')
|
||||
require('cmake').setup({
|
||||
parameters_file = 'neovim.json', -- JSON file to store information about selected target, run arguments and build type.
|
||||
build_dir = '{cwd}/build_nvim', -- Build directory. The expressions `{cwd}`, `{os}` and `{build_type}` will be expanded with the corresponding text values.
|
||||
})
|
||||
utils.map('n', '<F5>', ':CMake build<CR>:copen<CR>')
|
||||
|
||||
-- msbuild errorformat
|
||||
opt.errorformat:append("\\ %#%f(%l\\\\\\,%c):\\ %m")
|
||||
-- cl.exe errorformat
|
||||
-- o.errorformat:append('\ %#%f(%l) : %#%t%[A-z]%# %m')
|
||||
|
||||
-------------------- NEOCLIP -------------------------------
|
||||
require('neoclip').setup({
|
||||
default_register = '+',
|
||||
})
|
||||
require('telescope').load_extension('neoclip')
|
||||
-------------------- LUALINE -------------------------------
|
||||
require('lualine').setup {
|
||||
options = {theme = 'gruvbox'},
|
||||
sections = {lualine_c = {'getcwd', 'filename', 'nvim_treesitter#statusline'},
|
||||
}
|
||||
}
|
||||
-------------------- PROJECT -------------------------------
|
||||
require("project_nvim").setup {
|
||||
silent_chdir = true,
|
||||
}
|
||||
require('telescope').load_extension('projects')
|
||||
utils.map('n', '<space>p', '<cmd>Telescope projects<cr>')
|
||||
-------------------- TS-RAINBOW ----------------------------
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
|
||||
max_file_lines = nil, -- Do not enable for files with more than n lines, int
|
||||
-- colors = {}, -- table of hex strings
|
||||
-- termcolors = {} -- table of colour name strings
|
||||
}
|
||||
}
|
||||
-------------------- LUASNIP -------------------------------
|
||||
require("luasnip.loaders.from_vscode").load()
|
||||
-------------------- AUTOPAIRS -----------------------------
|
||||
require('nvim-autopairs').setup{}
|
||||
-------------------- FZF NATIVE ----------------------------
|
||||
require('telescope').load_extension('fzf')
|
||||
-------------------- TERMINAL ------------------------------
|
||||
require('nvim-terminal').setup({
|
||||
toggle_keymap = '<leader>z',
|
||||
})
|
||||
-------------------- INDENT-BLANKLINE ----------------------
|
||||
opt.listchars:append("eol:↴")
|
||||
-- opt.listchars:append("space: ")
|
||||
opt.listchars:append("trail: ")
|
||||
opt.listchars:append("tab:→ ")
|
||||
|
||||
require("indent_blankline").setup {
|
||||
show_end_of_line = true,
|
||||
use_treesitter = true,
|
||||
show_current_context = true,
|
||||
context_patterns = {'class', 'function', 'method', 'block', '^if', '^for', '^while'},
|
||||
}
|
||||
|
||||
|
73
lazy-lock.json
Normal file
73
lazy-lock.json
Normal file
@ -0,0 +1,73 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "e1fe53117aab24c378d5e6deaad786789c360123" },
|
||||
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
||||
"LuaSnip": { "branch": "master", "commit": "b4bc24c4925aeb05fd47d2ee9b24b7f73f5d7e32" },
|
||||
"advanced-git-search.nvim": { "branch": "main", "commit": "5637d80861e253a8621450eb58621009e1307deb" },
|
||||
"aerial.nvim": { "branch": "master", "commit": "d8f2699f7ae0e5eb62424d7b2ad80ce30179ee92" },
|
||||
"clangd_extensions.nvim": { "branch": "main", "commit": "798e377ec859087132b81d2f347b5080580bd6b1" },
|
||||
"cmake-tools.nvim": { "branch": "master", "commit": "b279bfb861666563399de3599c24040b53a42fd2" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "5af1bb7d722ef8a96658f01d6eb219c4cf746b32" },
|
||||
"cmp-cmdline-history": { "branch": "master", "commit": "003573b72d4635ce636234a826fa8c4ba2895ffe" },
|
||||
"cmp-dap": { "branch": "master", "commit": "d16f14a210cd28988b97ca8339d504533b7e09a4" },
|
||||
"cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" },
|
||||
"cmp-look": { "branch": "master", "commit": "b39c50bcdf6199dddda56adc466c2bd9c951a960" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
|
||||
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
|
||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" },
|
||||
"cmp-treesitter": { "branch": "master", "commit": "389eadd48c27aa6dc0e6b992644704f026802a2e" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "1d6ea6ced1c3ec0f6464761a138bb35afd79ef63" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "66e4990240f92e31b0d5e4df6deb6bb0160ae832" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "1d0dac346de7c6895ac72528df3276386c6b149b" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "814158f6c4b1724c039fcefe79b0be72c9131c2d" },
|
||||
"gruvbox.nvim": { "branch": "main", "commit": "df149bccb19a02c5c2b9fa6ec0716f0c0487feb0" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "aba872ec78ffe7f7367764ab0fff6f0170421fde" },
|
||||
"lazygit.nvim": { "branch": "main", "commit": "32bffdebe273e571588f25c8a708ca7297928617" },
|
||||
"leap.nvim": { "branch": "main", "commit": "6f2912755c9c4ae790abd829f0cf1b07c037b2a4" },
|
||||
"lsp_lines.nvim": { "branch": "main", "commit": "f53af96d4789eef39a082dbcce078d2bfc384ece" },
|
||||
"lsp_signature.nvim": { "branch": "master", "commit": "7a26ebaa7e36aa2aefa6c1994b2b866c96de32e6" },
|
||||
"lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "90a8bbf106b85b76951a34c542058ffa807de2b1" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e634134312bb936f472468a401c9cae6485ab54b" },
|
||||
"neo-tree.nvim": { "branch": "v2.x", "commit": "e5594d53986b34e584e8afe2ea6ad99d6f6d2105" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "5e7e613950df5e2be27534ab5c55fd21af1b2ad3" },
|
||||
"neogen": { "branch": "main", "commit": "c0fd3dc9e7cc91181ea5a345c4b01c865626c81e" },
|
||||
"neotest": { "branch": "master", "commit": "42cf226457c61abe6fca081e959d69e2325cf08f" },
|
||||
"neotest-python": { "branch": "master", "commit": "6c06041cfb45f45e276068020baa06c06fe20d5c" },
|
||||
"nui.nvim": { "branch": "main", "commit": "698e75814cd7c56b0dd8af4936bcef2d13807f3c" },
|
||||
"null-ls.nvim": { "branch": "main", "commit": "08bb00c7c2cd58c72e02cf54e4b9cbfe14b03e09" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "7747bbae60074acf0b9e3a4c13950be7a2dff444" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "d153771162bd9795d9f7142df5c674b61066a585" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" },
|
||||
"nvim-dap": { "branch": "master", "commit": "6cedcb527e264c8f25e86afa8dae74c6692dee51" },
|
||||
"nvim-dap-python": { "branch": "master", "commit": "51ecb08dbff57fca8add396b93dc765aba262e0a" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "4ce7b97dd8f50b4f672948a34bf8f3a56214fdb8" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "ab988dbb7d20cdaebf9b3ef7554a89f6895de042" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "df58d91c9351a9dc5be6cf8d54f49ab0d9a64e73" },
|
||||
"nvim-neoclip.lua": { "branch": "main", "commit": "8094648c54ff3b233ccfe5928f77b6824f77339c" },
|
||||
"nvim-rooter.lua": { "branch": "main", "commit": "99832f243426a28c1cc0b83ee4cdf915bf0b2c2b" },
|
||||
"nvim-surround": { "branch": "main", "commit": "e6047128e57c1aff1566fb9f627521d2887fc77a" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "f2778bd1a28b74adf5b1aa51aa57da85adfa3d16" },
|
||||
"nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "e283ab937e0197b37ec5d8013e49495193407324" },
|
||||
"octo.nvim": { "branch": "master", "commit": "1c9a79412a1d92dd3c5a601e2261c158ebb4d4bd" },
|
||||
"oil.nvim": { "branch": "master", "commit": "d27bfa1f370e8caddf65890364989b76f9794afb" },
|
||||
"overseer.nvim": { "branch": "master", "commit": "9e7cc435c1c85d37aa5471d7429501690f4d64d6" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "9ac3e9541bbabd9d73663d757e4fe48a675bb054" },
|
||||
"sqlite.lua": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" },
|
||||
"telescope-dap.nvim": { "branch": "master", "commit": "313d2ea12ae59a1ca51b62bf01fc941a983d9c9c" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" },
|
||||
"telescope-menufacture": { "branch": "main", "commit": "284eae0c6430a67ad5d24676e791749d31bd6bdf" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "ebf93395e79e5d026e3867d9e5e158b2bbe1499c" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "68fdf851c2b7901a7065ff129b77d3483419ddce" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "5f0d280b517cacb16f59316659966c7ca5e2bea2" },
|
||||
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "5a6c954a5a46023c19acc03a8b6d7c3e57964fc5" }
|
||||
}
|
14
lua/config/lazy.lua
Normal file
14
lua/config/lazy.lua
Normal file
@ -0,0 +1,14 @@
|
||||
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
'git',
|
||||
'clone',
|
||||
'--filter=blob:none',
|
||||
'--single-branch',
|
||||
'https://github.com/folke/lazy.nvim.git',
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.runtimepath:prepend(lazypath)
|
||||
|
||||
require('lazy').setup('plugins', {})
|
80
lua/config/options.lua
Normal file
80
lua/config/options.lua
Normal file
@ -0,0 +1,80 @@
|
||||
vim.cmd('filetype plugin indent on')
|
||||
vim.cmd('language en_US.utf-8')
|
||||
|
||||
local opt = vim.opt
|
||||
local indent = 2
|
||||
opt.termguicolors = true -- Enable colors in terminal
|
||||
opt.hlsearch = true --Set highlight on search
|
||||
opt.number = true --Make line numbers default
|
||||
opt.relativenumber = false --Make relative number default
|
||||
opt.mouse = 'a' --Enable mouse mode
|
||||
opt.breakindent = true --Enable break indent
|
||||
opt.undofile = true --Save undo history
|
||||
opt.ignorecase = true --Case insensitive searching unless /C or capital in search
|
||||
opt.smartcase = true -- Smart case
|
||||
opt.updatetime = 300 --Decrease update time
|
||||
opt.signcolumn = 'yes' -- Always show sign column
|
||||
opt.timeoutlen = 300 -- Time in milliseconds to wait for a mapped sequence to complete.
|
||||
opt.ttimeoutlen = 10
|
||||
opt.showmode = false -- Do not need to show the mode. We use the statusline instead.
|
||||
opt.scrolloff = 999 -- Lines of context
|
||||
opt.joinspaces = false -- No double spaces with join after a dot
|
||||
opt.showmatch = true -- Show matching braces
|
||||
opt.wrap = true -- When on, lines longer than the width of the window will wrap and displaying continues on the next line
|
||||
opt.list = true
|
||||
opt.hidden = true
|
||||
opt.scrolloff = 4
|
||||
opt.shiftround = true
|
||||
opt.relativenumber = false
|
||||
opt.splitbelow = true
|
||||
opt.splitright = true
|
||||
opt.wildmode = 'longest:full,full'
|
||||
opt.splitbelow = true
|
||||
opt.splitright = true
|
||||
opt.shiftwidth = indent
|
||||
opt.tabstop = indent
|
||||
if vim.fn.has('wsl') == 1 then
|
||||
vim.g.clipboard = {
|
||||
name = 'WslClipboard',
|
||||
copy = {
|
||||
['+'] = 'clip.exe',
|
||||
['*'] = 'clip.exe',
|
||||
},
|
||||
paste = {
|
||||
['+'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
|
||||
['*'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
|
||||
},
|
||||
cache_enabled = 0,
|
||||
}
|
||||
opt.guifont = 'JetBrainsMonoNL NF:h9' -- https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/JetBrainsMono/NoLigatures/Regular/complete/JetBrains%20Mono%20NL%20Regular%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf
|
||||
|
||||
elseif vim.loop.os_uname().sysname == 'Linux' then
|
||||
opt.guifont = 'JetBrainsMono Nerd Font Mono:h7'
|
||||
else
|
||||
opt.guifont = 'Hack Nerd Font Mono:h10'
|
||||
end
|
||||
opt.swapfile = false
|
||||
opt.backup = false
|
||||
opt.spelllang = 'en,de'
|
||||
opt.completeopt = 'menu,menuone,noselect'
|
||||
opt.expandtab = true
|
||||
opt.smartindent = true
|
||||
opt.title = true
|
||||
opt.titlestring='%(%{fnamemodify(getcwd(),\":t\")}%) Neovim'
|
||||
opt.laststatus = 3 -- for lualine
|
||||
|
||||
-- go to previous/next line with h,l,left arrow and right arrow
|
||||
-- when cursor reaches end/beginning of line
|
||||
-- opt.whichwrap:append('<>[]hl')
|
||||
|
||||
-- disable nvim intro
|
||||
opt.shortmess:append('sI')
|
||||
|
||||
-- Treesitter based folding
|
||||
opt.foldlevel = 20
|
||||
opt.foldmethod = 'expr'
|
||||
opt.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||
opt.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||
|
||||
-- Window border for floating windows
|
||||
require('lspconfig.ui.windows').default_options.border = 'rounded'
|
@ -1,45 +1,79 @@
|
||||
function nvim_create_augroups(definitions)
|
||||
for group_name, definition in pairs(definitions) do
|
||||
vim.cmd('augroup ' .. group_name)
|
||||
vim.cmd('autocmd!')
|
||||
for _, def in ipairs(definition) do
|
||||
local command = table.concat(vim.tbl_flatten{'autocmd', def}, ' ')
|
||||
vim.cmd(command)
|
||||
end
|
||||
vim.cmd('augroup END')
|
||||
end
|
||||
end
|
||||
local api = vim.api
|
||||
|
||||
local autocmds = {
|
||||
packer = {
|
||||
{ 'BufWritePost', 'plugins.lua', 'PackerCompile' };
|
||||
};
|
||||
restore_cursor = {
|
||||
{ 'BufRead', '*', [[call setpos(".", getpos("'\""))]] };
|
||||
};
|
||||
save_shada = {
|
||||
{'FocusGained,FocusLost', '*', 'rshada|wshada'};
|
||||
};
|
||||
resize_windows_proportionally = {
|
||||
{ 'VimResized', '*', ':wincmd =' };
|
||||
};
|
||||
lua_highlight = {
|
||||
{ 'TextYankPost', '*', [[silent! lua vim.highlight.on_yank() {higroup='IncSearch', timeout=400}]] };
|
||||
};
|
||||
file_type = {
|
||||
{'BufRead,BufNewFile', '*.simvis', 'set filetype=xml'};
|
||||
{'BufRead,BufNewFile', '*.simcfg,*.simcon,*.simudex', 'set filetype=cfg'};
|
||||
{'BufRead,BufNewFile', 'Jenkinsfile*', 'set filetype=groovy'};
|
||||
{'BufRead,BufNewFile', '*.manifest', 'set filetype=xml'};
|
||||
{'BufRead,BufNewFile', 'SConstruct,SConscript', 'set filetype=python'};
|
||||
};
|
||||
file_changed = {
|
||||
{'BufEnter,FocusGained', '*', 'checktime'};
|
||||
};
|
||||
no_auto_comment = {
|
||||
{'BufEnter', '*', 'set fo-=c fo-=r fo-=o'}
|
||||
}
|
||||
}
|
||||
-- Highlight on yank
|
||||
local yankGrp = api.nvim_create_augroup('YankHighlight', { clear = true })
|
||||
api.nvim_create_autocmd('TextYankPost', {
|
||||
command = 'silent! lua vim.highlight.on_yank()',
|
||||
group = yankGrp,
|
||||
})
|
||||
|
||||
nvim_create_augroups(autocmds)
|
||||
-- Filetypes
|
||||
local fileGrp = api.nvim_create_augroup('file_type', { clear = true })
|
||||
api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
|
||||
pattern = { '*.simvis', '*.manifest' },
|
||||
callback = function()
|
||||
vim.bo.filetype = 'xml'
|
||||
end,
|
||||
group = fileGrp,
|
||||
})
|
||||
api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
|
||||
pattern = { '*.simcfg', '*.simcon', '*.simudex' },
|
||||
callback = function()
|
||||
vim.bo.filetype = 'xml'
|
||||
end,
|
||||
group = fileGrp,
|
||||
})
|
||||
api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
|
||||
pattern = { 'JenkinsFile*' },
|
||||
callback = function()
|
||||
vim.bo.filetype = 'groovy'
|
||||
end,
|
||||
group = fileGrp,
|
||||
})
|
||||
api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
|
||||
pattern = { 'SConstruct', 'SConscript' },
|
||||
callback = function()
|
||||
vim.bo.filetype = 'python'
|
||||
end,
|
||||
group = fileGrp,
|
||||
})
|
||||
api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
|
||||
pattern = { 'doskey' },
|
||||
callback = function()
|
||||
vim.bo.filetype = 'dosini'
|
||||
end,
|
||||
group = fileGrp,
|
||||
})
|
||||
api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, {
|
||||
pattern = { '.clangd', '.clang-tidy' },
|
||||
callback = function()
|
||||
vim.bo.filetype = 'yaml'
|
||||
end,
|
||||
group = fileGrp,
|
||||
})
|
||||
|
||||
-- Read and write shada file
|
||||
api.nvim_create_autocmd({ 'FocusLost' }, { command = [[wshada]] })
|
||||
|
||||
-- go to last loc when opening a buffer
|
||||
-- api.nvim_create_autocmd(
|
||||
-- 'BufReadPost',
|
||||
-- { command = [[if line("'\"") > 1 && line("'\"") <= line("$") | execute "normal! g`\"" | endif]] }
|
||||
-- )
|
||||
|
||||
-- Check if we need to reload the file when it changed
|
||||
api.nvim_create_autocmd({ 'FocusGained', 'BufEnter' },
|
||||
{ command = [[if !bufexists("[Command Line]") | checktime | endif]] })
|
||||
|
||||
-- windows to close with "q"
|
||||
api.nvim_create_autocmd(
|
||||
'FileType',
|
||||
{ pattern = { 'help', 'startuptime', 'qf', 'lspinfo' }, command = [[nnoremap <buffer><silent> q :close<CR>]] }
|
||||
)
|
||||
api.nvim_create_autocmd('FileType', { pattern = 'man', command = [[nnoremap <buffer><silent> q :quit<CR>]] })
|
||||
|
||||
-- don't auto comment new line
|
||||
api.nvim_create_autocmd('BufEnter', { command = [[set formatoptions-=cro]] })
|
||||
|
||||
-- Keep window ratio when resize
|
||||
api.nvim_create_autocmd('VimResized', { command = [[wincmd =]] })
|
||||
|
118
lua/my_cmp.lua
118
lua/my_cmp.lua
@ -1,118 +0,0 @@
|
||||
local cmp = require('cmp')
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
local t = function(str)
|
||||
return vim.api.nvim_replace_termcodes(str, true, true, true)
|
||||
end
|
||||
|
||||
local check_back_space = function()
|
||||
local col = vim.fn.col(".") - 1
|
||||
return col == 0 or vim.fn.getline("."):sub(col, col):match("%s") ~= nil
|
||||
end
|
||||
|
||||
cmp.setup {
|
||||
|
||||
formatting = {
|
||||
format = function(entry, vim_item)
|
||||
-- fancy icons and a name of kind
|
||||
vim_item.kind = require("lspkind").presets.default[vim_item.kind] ..
|
||||
" " .. vim_item.kind
|
||||
-- set a name for each source
|
||||
vim_item.menu = ({
|
||||
buffer = "[Buffer]",
|
||||
nvim_lsp = "[LSP]",
|
||||
ultisnips = "[UltiSnips]",
|
||||
nvim_lua = "[Lua]",
|
||||
cmp_tabnine = "[TabNine]",
|
||||
look = "[Look]",
|
||||
path = "[Path]",
|
||||
spell = "[Spell]",
|
||||
calc = "[Calc]",
|
||||
emoji = "[Emoji]"
|
||||
})[entry.source.name]
|
||||
return vim_item
|
||||
end
|
||||
},
|
||||
mapping = {
|
||||
['<Up>'] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c', 's'}),
|
||||
['<Down>'] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c', 's' }),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c', 's' }),
|
||||
['<C-e>'] = cmp.mapping(cmp.mapping.close(), { 'i', 'c', 's' }),
|
||||
['<CR>'] = cmp.mapping({
|
||||
i = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true }),
|
||||
c = cmp.mapping.confirm({ select = false }),
|
||||
s = cmp.mapping.confirm({ select = false }),
|
||||
}),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if luasnip.expand_or_jumpable() then
|
||||
vim.api.nvim_feedkeys(t("<Plug>luasnip-expand-or-jump"), "", true)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, {
|
||||
"i",
|
||||
"s",
|
||||
}),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if luasnip.jumpable(-1) then
|
||||
vim.api.nvim_feedkeys(t("<Plug>luasnip-jump-prev"), "", true)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, {
|
||||
"i",
|
||||
"s",
|
||||
}),
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require'luasnip'.lsp_expand(args.body)
|
||||
end
|
||||
},
|
||||
sources = {
|
||||
{name = 'nvim_lsp'}, {name = 'buffer'}, {name = "luasnip"},
|
||||
{name = "nvim_lua"}, {name = "look"}, {name = "path"},
|
||||
{name = 'cmp_tabnine'}, {name = "calc"}, {name = "spell"},
|
||||
{name = "emoji"}
|
||||
},
|
||||
completion = {completeopt = 'menu,menuone,noinsert, noselect'},
|
||||
-- experimental = { native_menu = true }
|
||||
}
|
||||
|
||||
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline('/', {
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
},
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
}, {
|
||||
{ name = 'buffer' }
|
||||
}),
|
||||
})
|
||||
|
||||
-- Autopairs
|
||||
--require("nvim-autopairs.completion.cmp").setup({
|
||||
-- map_cr = true,
|
||||
-- map_complete = true,
|
||||
-- auto_select = true
|
||||
--})
|
||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||
cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } }))
|
||||
|
||||
-- TabNine
|
||||
--local tabnine = require('cmp_tabnine.config')
|
||||
--tabnine:setup({max_lines = 1000, max_num_results = 20, sort = true})
|
||||
|
||||
-- Database completion
|
||||
vim.api.nvim_exec([[
|
||||
autocmd FileType sql,mysql,plsql lua require('cmp').setup.buffer({ sources = {{ name = 'vim-dadbod-completion' }} })
|
||||
]], false)
|
@ -1,90 +1,61 @@
|
||||
local utils = require('utils')
|
||||
vim.g.mapleader = ','
|
||||
-- Paste from clipboard
|
||||
utils.map('n', '<leader>p', '"+p')
|
||||
utils.map('n', '<leader>P', '"+P')
|
||||
utils.map('v', '<leader>p', '"+p')
|
||||
utils.map('v', '<leader>P', '"+P')
|
||||
|
||||
-- Yank to clipboard
|
||||
utils.map('v', '<leader>y', '"+y')
|
||||
utils.map('n', '<leader>Y', '"+yg_')
|
||||
utils.map('n', '<leader>y', '"+y')
|
||||
utils.map('n', '<leader>yy', '"+yy')
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
-- Tabs
|
||||
utils.map('n', '<F2>', ':tabnew .<CR>', { noremap = true, silent = true })
|
||||
utils.map('i', '<F2>', '<Esc>:tabnew .<CR>', { noremap = true, silent = true })
|
||||
-- utils.map('n', '<S-Right>', ':BufferLineCycleNext<CR>')
|
||||
-- utils.map('n', '<S-Left>', ':BufferLineCyclePrev<CR>')
|
||||
utils.map('n', '<S-Right>', ':tabnext<CR>', { noremap = true, silent = true })
|
||||
utils.map('n', '<S-Left>', ':tabprevious<CR>', { noremap = true, silent = true })
|
||||
vim.keymap.set('n', '<S-Right>', ':tabnext<CR>', opts)
|
||||
vim.keymap.set('n', '<S-Left>', ':tabprevious<CR>', opts)
|
||||
-- Split movement
|
||||
utils.map('n', '<A-Up>', ':wincmd k<CR>', { noremap = true, silent = true })
|
||||
utils.map('n', '<A-Down>', ':wincmd j<CR>', { noremap = true, silent = true })
|
||||
utils.map('n', '<A-Left>', ':wincmd h<CR>', { noremap = true, silent = true })
|
||||
utils.map('n', '<A-Right>', ':wincmd l<CR>', { noremap = true, silent = true })
|
||||
-- Open a new vertical split window with Ctrl - F2
|
||||
utils.map('n', '<C-F2>', ':vsplit .<CR>', { noremap = true, silent = true })
|
||||
utils.map('i', '<C-F2>', '<Esc>:vsplit .<CR>', { noremap = true, silent = true })
|
||||
-- Open a new horizontal split window with Shift - F2
|
||||
utils.map('n', '<S-F2>', ':split .<CR>', { noremap = true, silent = true })
|
||||
utils.map('i', '<S-F2>', '<Esc>:split .<CR>', { noremap = true, silent = true })
|
||||
vim.keymap.set('n', '<A-Up>', ':wincmd k<CR>', opts)
|
||||
vim.keymap.set('n', '<A-Down>', ':wincmd j<CR>', opts)
|
||||
vim.keymap.set('n', '<A-Left>', ':wincmd h<CR>', opts)
|
||||
vim.keymap.set('n', '<A-Right>', ':wincmd l<CR>', opts)
|
||||
|
||||
utils.map('n', '<C-S>', ':wa<CR>')
|
||||
vim.keymap.set('n', '<C-S>', ':wa | wshada<CR>')
|
||||
|
||||
-- Linewrap and jumping
|
||||
utils.map('n', 'k', 'gk')
|
||||
utils.map('n', 'j', 'gj')
|
||||
utils.map('n', '0', 'g0')
|
||||
utils.map('n', '$', 'g$')
|
||||
utils.map('n', '<Up>', 'gk')
|
||||
utils.map('n', '<Down>', 'gj')
|
||||
utils.map('n', '<Home>', 'g<Home>')
|
||||
utils.map('n', '<End>', 'g<End>')
|
||||
utils.map('v', 'k', 'gk')
|
||||
utils.map('v', 'j', 'gj')
|
||||
utils.map('v', '0', 'g0')
|
||||
utils.map('v', '$', 'g$')
|
||||
utils.map('v', '<Up>', 'gk')
|
||||
utils.map('v', '<Down>', 'gj')
|
||||
utils.map('v', '<Home>', 'g<Home>')
|
||||
utils.map('v', '<End>', 'g<End>')
|
||||
vim.keymap.set({ 'n', 'x' }, 'k', 'gk', opts)
|
||||
vim.keymap.set({ 'n', 'x' }, 'j', 'gj', opts)
|
||||
vim.keymap.set({ 'n', 'x' }, '0', 'g0', opts)
|
||||
vim.keymap.set({ 'n', 'x' }, '$', 'g$', opts)
|
||||
vim.keymap.set({ 'n', 'x' }, '<Up>', 'gk', opts)
|
||||
vim.keymap.set({ 'n', 'x' }, '<Down>', 'gj', opts)
|
||||
vim.keymap.set({ 'n', 'x' }, '<Home>', 'g<Home>', opts)
|
||||
vim.keymap.set({ 'n', 'x' }, '<End>', 'g<End>', opts)
|
||||
|
||||
utils.map('v', '<', '<gv')
|
||||
utils.map('v', '>', '>gv')
|
||||
vim.keymap.set('x', '<', '<gv')
|
||||
vim.keymap.set('x', '>', '>gv')
|
||||
|
||||
local function hlWord()
|
||||
local current_word = vim.call('expand', '<cword>')
|
||||
vim.fn.setreg('/', '\\<' .. current_word .. '\\>')
|
||||
vim.opt.hlsearch = true
|
||||
end
|
||||
|
||||
-- Highlight word under cursor
|
||||
utils.map('n', 'ü', ":let @/='\\<<C-R>=expand(\"<cword>\")<CR>\\>'<CR>:set hls<CR>", { noremap = true, silent = true })
|
||||
utils.map('v', 'ü', "y:let @/='<C-R>=escape(@\",'/\\')<CR>'<CR>:set hls<CR>") utils.map('v', 'ü', "y:let @/='<C-R>=escape(@\",'/\\')<CR>'<CR>:set hls<CR>", { noremap = true, silent = true })
|
||||
vim.keymap.set('n', "'", hlWord, { noremap = true, silent = true, desc = 'Higlight word under cursor' })
|
||||
vim.keymap.set('x', "'", 'y/\\V<C-R>"<CR>N', { noremap = true, silent = true, desc = 'Highlight visual' })
|
||||
|
||||
-- Close Buffer
|
||||
utils.map('n', '<C-w>', ':bd<CR>')
|
||||
vim.keymap.set('n', '<C-w>', ':bd<CR>', { desc = 'Close buffer' })
|
||||
|
||||
-- <Tab> to navigate the completion menu
|
||||
utils.map('i', '<S-Tab>', 'pumvisible() ? "\\<C-p>" : "\\<Tab>"', {expr = true})
|
||||
utils.map('i', '<Tab>', 'pumvisible() ? "\\<C-n>" : "\\<Tab>"', {expr = true})
|
||||
vim.keymap.set('n', '<space>x', 'za', { desc = 'Toggle fold' })
|
||||
|
||||
-- Telescope
|
||||
utils.map('n', '<leader>f', '<cmd>Telescope find_files<cr>')
|
||||
utils.map('n', '<C-p>', '<cmd>Telescope find_files<cr>')
|
||||
utils.map('n', '<leader>g', '<cmd>Telescope git_files<cr>')
|
||||
utils.map('n', '<leader>o', '<cmd>Telescope oldfiles<cr>')
|
||||
utils.map('n', '<leader>h', '<cmd>Telescope command_history<cr>')
|
||||
utils.map('v', '<leader>h', '<cmd>Telescope command_history<cr>')
|
||||
utils.map('n', '<C-S-p>', '<cmd>Telescope commands<cr>')
|
||||
utils.map('n', '<leader>b', '<cmd>Telescope buffers<cr>')
|
||||
utils.map('n', '<leader>q', '<cmd>Telescope quickfix<cr>')
|
||||
utils.map('n', '<leader>l', '<cmd>Telescope live_grep<cr>')
|
||||
utils.map('n', '<space>r', '<cmd>Telescope lsp_references<cr>')
|
||||
utils.map('n', '<C-S-o>', '<cmd>Telescope lsp_document_symbols<cr>')
|
||||
utils.map('n', '<A-m>', '<cmd>Telescope lsp_document_symbols<cr>')
|
||||
utils.map('n', '<space>v', '<cmd>Telescope diagnostics bufnr=0<cr>')
|
||||
utils.map('n', '<C-y>', '<cmd>Telescope neoclip<cr>')
|
||||
utils.map('n', '<leader>j', '<cmd>Telescope jumplist<cr>')
|
||||
|
||||
-- wildmode
|
||||
vim.keymap.set({ 'n', 'x' }, '<leader>y', '"+y', { desc = 'Copy from system clipboard' })
|
||||
vim.keymap.set({ 'n', 'x' }, '<leader>Y', '"+yg_', { desc = 'Copy from system clipboard' })
|
||||
vim.keymap.set({ 'n', 'x' }, '<leader>p', '"+p', { desc = 'Paste from system clipboard' })
|
||||
vim.keymap.set({ 'n', 'x' }, '<leader>P', '"+P', { desc = 'Paste from system clipboard' })
|
||||
|
||||
-- Symbols Outline
|
||||
utils.map('n', '<leader>s', '<cmd>SymbolsOutline<cr>')
|
||||
vim.api.nvim_create_user_command('WinFont', 'set guifont=JetBrainsMonoNL\\ NF:h9', {})
|
||||
vim.api.nvim_create_user_command('LinuxFont', 'set guifont=JetBrainsMono\\ Nerd\\ Font\\ Mono:h7', {})
|
||||
|
||||
if vim.g.neovide then
|
||||
vim.g.neovide_scale_factor = 1.0
|
||||
local change_scale_factor = function(delta)
|
||||
vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta
|
||||
print(string.format('scaling: %f', vim.g.neovide_scale_factor))
|
||||
end
|
||||
vim.keymap.set('n', '<C-=>', function() change_scale_factor(1.25) end)
|
||||
vim.keymap.set('n', '<C-->', function() change_scale_factor(1 / 1.25) end)
|
||||
vim.keymap.set('n', '<C-ScrollWheelUp>', function() change_scale_factor(1.25) end)
|
||||
vim.keymap.set('n', '<C-ScrollWheelDown>', function() change_scale_factor(1 / 1.25) end)
|
||||
end
|
||||
|
@ -1,108 +0,0 @@
|
||||
local utils = require('utils')
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities.textDocument.completion.completionItem.documentationFormat = { 'markdown', 'plaintext' }
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
capabilities.textDocument.completion.completionItem.preselectSupport = true
|
||||
capabilities.textDocument.completion.completionItem.insertReplaceSupport = true
|
||||
capabilities.textDocument.completion.completionItem.labelDetailsSupport = true
|
||||
capabilities.textDocument.completion.completionItem.deprecatedSupport = true
|
||||
capabilities.textDocument.completion.completionItem.commitCharactersSupport = true
|
||||
capabilities.textDocument.completion.completionItem.tagSupport = { valueSet = { 1 } }
|
||||
capabilities.textDocument.completion.completionItem.resolveSupport = {
|
||||
properties = {
|
||||
'documentation',
|
||||
'detail',
|
||||
'additionalTextEdits',
|
||||
},
|
||||
}
|
||||
|
||||
local on_attach = function(client, bufnr)
|
||||
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
|
||||
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
||||
|
||||
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
-- Mappings.
|
||||
local opts = { noremap=true, silent=true }
|
||||
utils.map('n', '<space>,', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
|
||||
utils.map('n', '<space>;', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
|
||||
utils.map('n', '<space>a', '<cmd>Telescope lsp_code_actions<CR>', opts)
|
||||
utils.map('n', '<space>d', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||
utils.map('n', '<space>e', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
||||
utils.map('n', '<space>h', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||
utils.map('n', '<space>c', '<cmd>lua vim.lsp.buf.outgoing_calls()<CR>', opts)
|
||||
utils.map('n', '<space>C', '<cmd>lua vim.lsp.buf.incoming_calls()<CR>', opts)
|
||||
utils.map('n', '<space>m', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||
-- utils.map('n', '<space>r', '<cmd>lua vim.lsp.buf.references()<CR, opts>')
|
||||
utils.map('n', '<space>s', '<cmd>lua vim.lsp.buf.document_symbol()<CR>', opts)
|
||||
utils.map('n', '<C-t>', '<cmd>Telescope lsp_dynamic_workspace_symbols<CR>', opts)
|
||||
utils.map('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||
utils.map('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
||||
utils.map('n', '<space>r', '<cmd>Telescope lsp_references<cr>')
|
||||
utils.map('n', '<C-S-o>', '<cmd>Telescope lsp_document_symbols<cr>')
|
||||
utils.map('n', '<A-m>', '<cmd>Telescope lsp_document_symbols<cr>')
|
||||
utils.map('n', '<space>v', '<cmd>Telescope diagnostics bufnr=0<cr>')
|
||||
utils.map('n', '<A-o>', ':ClangdSwitchSourceHeader<CR>', opts)
|
||||
|
||||
-- Set some keybinds conditional on server capabilities
|
||||
if client.resolved_capabilities.document_formatting then
|
||||
utils.map('n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
|
||||
end
|
||||
if client.resolved_capabilities.document_range_formatting then
|
||||
utils.map('v', '<space>f', '<esc><cmd>lua vim.lsp.buf.range_formatting()<CR>', opts)
|
||||
end
|
||||
|
||||
-- Set autocommands conditional on server_capabilities
|
||||
if client.resolved_capabilities.document_highlight then
|
||||
vim.api.nvim_exec([[
|
||||
hi LspReferenceRead cterm=bold ctermbg=red guibg=DarkGreen
|
||||
hi LspReferenceText cterm=bold ctermbg=Black guibg=DarkYellow guifg=Black
|
||||
hi LspReferenceWrite cterm=bold ctermbg=red guibg=DarkRed
|
||||
augroup lsp_document_highlight
|
||||
autocmd! * <buffer>
|
||||
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
|
||||
autocmd CursorHoldI <buffer> lua vim.lsp.buf.document_highlight()
|
||||
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
|
||||
augroup END
|
||||
]], false)
|
||||
end
|
||||
require "lsp_signature".on_attach({
|
||||
bind = true, -- This is mandatory, otherwise border config won't get registered.
|
||||
handler_opts = {
|
||||
border = "single"
|
||||
},
|
||||
hi_parameter = "IncSearch"
|
||||
}, bufnr)
|
||||
end
|
||||
|
||||
local lsp_installer = require("nvim-lsp-installer")
|
||||
lsp_installer.on_server_ready(function(server)
|
||||
local opts = {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
-- (optional) Customize the options passed to the server
|
||||
-- if server.name == "tsserver" then
|
||||
-- opts.root_dir = function() ... end
|
||||
-- end
|
||||
|
||||
-- This setup() function is exactly the same as lspconfig's setup function (:help lspconfig-quickstart)
|
||||
server:setup(opts)
|
||||
vim.cmd [[ do User LspAttachBuffers ]]
|
||||
end)
|
||||
|
||||
local null_ls = require("null-ls")
|
||||
null_ls.setup {
|
||||
sources = {
|
||||
null_ls.builtins.code_actions.gitsigns,
|
||||
null_ls.builtins.formatting.autopep8,
|
||||
null_ls.builtins.formatting.prettier,
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.diagnostics.flake8,
|
||||
null_ls.builtins.formatting.isort
|
||||
},
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
local utils = require('utils')
|
||||
vim.cmd 'colorscheme gruvbox-material' -- Put your favorite colorscheme here
|
||||
vim.cmd 'syntax enable'
|
||||
vim.cmd 'filetype plugin indent on'
|
||||
vim.cmd 'language en_US.utf-8'
|
||||
utils.opt('o', 'hlsearch', true)
|
||||
utils.opt('o', 'guifont', 'Hack NF:h9')
|
||||
utils.opt('o', 'swapfile', false)
|
||||
utils.opt('o', 'backup', false)
|
||||
utils.opt('o', 'spelllang', 'en,de')
|
||||
local indent = 2
|
||||
utils.opt('b', 'expandtab', true)
|
||||
utils.opt('b', 'shiftwidth', indent)
|
||||
utils.opt('b', 'smartindent', true)
|
||||
utils.opt('b', 'tabstop', indent)
|
||||
utils.opt('o', 'hidden', true)
|
||||
utils.opt('o', 'ignorecase', true)
|
||||
utils.opt('o', 'scrolloff', 4 )
|
||||
utils.opt('o', 'shiftround', true)
|
||||
utils.opt('o', 'relativenumber', false)
|
||||
utils.opt('o', 'smartcase', true)
|
||||
utils.opt('o', 'splitbelow', true)
|
||||
utils.opt('o', 'splitright', true)
|
||||
utils.opt('o', 'wildmode', 'longest:full,full')
|
||||
utils.opt('w', 'number', true)
|
||||
utils.opt('o', 'clipboard', 'unnamed,unnamedplus')
|
||||
utils.opt('o', 'mouse', 'a')
|
||||
utils.opt('o', 'wrap', false)
|
||||
utils.opt('o', 'termguicolors', true)
|
||||
utils.opt('o', 'splitbelow', true)
|
||||
utils.opt('o', 'splitright', true)
|
||||
utils.opt('o', 'list', true)
|
||||
utils.opt('o', 'updatetime', 300)
|
||||
utils.opt('o', 'wrap', true)
|
||||
utils.opt('o', 'showmatch', true)
|
@ -1,55 +0,0 @@
|
||||
return require('packer').startup(function()
|
||||
|
||||
-- Packer can manage itself as an optional plugin
|
||||
use {'wbthomason/packer.nvim'}
|
||||
use {'neovim/nvim-lspconfig'}
|
||||
use {'nvim-treesitter/nvim-treesitter'}
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}, {'kyazdani42/nvim-web-devicons'}}
|
||||
}
|
||||
use {'sainnhe/gruvbox-material'}
|
||||
use {'lukas-reineke/indent-blankline.nvim'}
|
||||
use {'nvim-lua/plenary.nvim'}
|
||||
use {'lewis6991/gitsigns.nvim'}
|
||||
use {
|
||||
'kyazdani42/nvim-tree.lua',
|
||||
requires = 'kyazdani42/nvim-web-devicons'
|
||||
}
|
||||
use{'numToStr/Comment.nvim'}
|
||||
use {
|
||||
'hrsh7th/nvim-cmp',
|
||||
requires = {
|
||||
'hrsh7th/cmp-buffer', 'hrsh7th/cmp-nvim-lsp',
|
||||
'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip', 'hrsh7th/cmp-nvim-lua',
|
||||
'octaltree/cmp-look', 'hrsh7th/cmp-path', 'hrsh7th/cmp-calc',
|
||||
'f3fora/cmp-spell', 'hrsh7th/cmp-emoji', 'hrsh7th/cmp-cmdline'
|
||||
}
|
||||
}
|
||||
use {'rafamadriz/friendly-snippets'}
|
||||
use {'onsails/lspkind-nvim'}
|
||||
use {'Shatur/neovim-cmake',
|
||||
requires = {'mfussenegger/nvim-dap'}
|
||||
}
|
||||
use {'AckslD/nvim-neoclip.lua'}
|
||||
use {
|
||||
'hoob3rt/lualine.nvim',
|
||||
requires = {'kyazdani42/nvim-web-devicons', opt = true}
|
||||
}
|
||||
use {'ahmedkhalf/project.nvim'}
|
||||
use {'p00f/nvim-ts-rainbow'}
|
||||
use {'simrat39/symbols-outline.nvim'}
|
||||
use {'f-person/git-blame.nvim'}
|
||||
use {'windwp/nvim-autopairs'}
|
||||
use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make'}
|
||||
use {'ray-x/lsp_signature.nvim'}
|
||||
use {'s1n7ax/nvim-terminal'}
|
||||
use {
|
||||
'williamboman/nvim-lsp-installer',
|
||||
requires = {'neovim/nvim-lspconfig'}
|
||||
}
|
||||
use {
|
||||
'jose-elias-alvarez/null-ls.nvim',
|
||||
requires = {'nvim-lua/plenary.nvim'}
|
||||
}
|
||||
end)
|
@ -1,48 +0,0 @@
|
||||
local actions = require('telescope.actions')
|
||||
|
||||
local mappingTab = {
|
||||
i = {
|
||||
['<cr>'] = actions.select_tab,
|
||||
['<C-b>'] = actions.select_default,
|
||||
}
|
||||
}
|
||||
|
||||
require('telescope').setup {
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
['<esc>'] = actions.close,
|
||||
['<cr>'] = actions.select_default + actions.center,
|
||||
['<C-l>'] = actions.send_selected_to_loclist,
|
||||
['<C-q>'] = actions.smart_send_to_qflist
|
||||
}
|
||||
}
|
||||
},
|
||||
pickers = {
|
||||
-- Your special builtin config goes in here
|
||||
buffers = {
|
||||
sort_lastused = true,
|
||||
theme = 'ivy',
|
||||
mappings = {
|
||||
i = {
|
||||
['<c-w>'] = actions.delete_buffer,
|
||||
['<cr>'] = actions.select_default,
|
||||
},
|
||||
n = {
|
||||
['<c-w>'] = actions.delete_buffer,
|
||||
}
|
||||
}
|
||||
},
|
||||
find_files = {
|
||||
theme = 'ivy',
|
||||
},
|
||||
oldfiles = {
|
||||
theme = 'ivy',
|
||||
},
|
||||
git_files = {
|
||||
theme = 'ivy',
|
||||
},
|
||||
lsp_dynamic_workspace_symbols = {
|
||||
},
|
||||
}
|
||||
}
|
28
lua/overseer/template/user/cmake/build.lua
Normal file
28
lua/overseer/template/user/cmake/build.lua
Normal file
@ -0,0 +1,28 @@
|
||||
|
||||
return {
|
||||
name = 'CMake Build for nvim',
|
||||
builder = function()
|
||||
return {
|
||||
cmd = { 'cmake' },
|
||||
args = { '--build', '.',
|
||||
'--', '-j8' },
|
||||
cwd = 'build_nvim',
|
||||
-- components = {"on_output_parse", problem_matcher = "$gcc"}
|
||||
-- components = {'on_output_quickfix', set_diagnostics = true, open = true}
|
||||
components = { { "on_output_quickfix", open = true, open_on_match = true },
|
||||
{ 'on_output_parse', problem_matcher = '$gcc' },
|
||||
'default' },
|
||||
}
|
||||
end,
|
||||
condition = {
|
||||
callback = function(opts)
|
||||
if vim.fn.executable("cmake") == 0 then
|
||||
return false, 'Command "cmake" not found'
|
||||
end
|
||||
if vim.fn.findfile("CMakeLists.txt", opts.dir .. ";") == "" then
|
||||
return false, "No CMakeLists.txt found"
|
||||
end
|
||||
return true
|
||||
end,
|
||||
},
|
||||
}
|
23
lua/overseer/template/user/cmake/clean.lua
Normal file
23
lua/overseer/template/user/cmake/clean.lua
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
return {
|
||||
name = 'CMake Clean for nvim',
|
||||
builder = function()
|
||||
return {
|
||||
cmd = { 'cmake' },
|
||||
args = { '--build', '.',
|
||||
'-t', 'clean' },
|
||||
cwd = 'build_nvim',
|
||||
}
|
||||
end,
|
||||
condition = {
|
||||
callback = function(opts)
|
||||
if vim.fn.executable("cmake") == 0 then
|
||||
return false, 'Command "cmake" not found'
|
||||
end
|
||||
if vim.fn.findfile("CMakeLists.txt", opts.dir .. ";") == "" then
|
||||
return false, "No CMakeLists.txt found"
|
||||
end
|
||||
return true
|
||||
end,
|
||||
},
|
||||
}
|
6
lua/overseer/template/user/cmake/cmake.lua
Normal file
6
lua/overseer/template/user/cmake/cmake.lua
Normal file
@ -0,0 +1,6 @@
|
||||
return {
|
||||
'builtin',
|
||||
'user.cmake.configure',
|
||||
'user.cmake.build',
|
||||
'user.cmake.clean'}
|
||||
-- https://gitlab.com/ranjithshegde/dotbare/-/tree/master/.config/nvim/lua/overseer
|
24
lua/overseer/template/user/cmake/configure.lua
Normal file
24
lua/overseer/template/user/cmake/configure.lua
Normal file
@ -0,0 +1,24 @@
|
||||
return {
|
||||
name = 'CMake Configure for nvim',
|
||||
builder = function()
|
||||
local cwd = vim.fn.getcwd()
|
||||
return {
|
||||
cmd = { 'cmake' },
|
||||
args = { '-B', 'build_nvim',
|
||||
'-S', cwd,
|
||||
'-G', 'Ninja' },
|
||||
cwd = build_nvim,
|
||||
}
|
||||
end,
|
||||
condition = {
|
||||
callback = function(opts)
|
||||
if vim.fn.executable("cmake") == 0 then
|
||||
return false, 'Command "cmake" not found'
|
||||
end
|
||||
if vim.fn.findfile("CMakeLists.txt", opts.dir .. ";") == "" then
|
||||
return false, "No CMakeLists.txt found"
|
||||
end
|
||||
return true
|
||||
end,
|
||||
},
|
||||
}
|
67
lua/plugins/advanced-git-search.lua
Normal file
67
lua/plugins/advanced-git-search.lua
Normal file
@ -0,0 +1,67 @@
|
||||
return {
|
||||
'aaronhallaert/advanced-git-search.nvim',
|
||||
config = function()
|
||||
require('telescope').load_extension('advanced_git_search')
|
||||
vim.api.nvim_create_user_command(
|
||||
'DiffCommitLine',
|
||||
'lua require("telescope").extensions.advanced_git_search.diff_commit_line()',
|
||||
{ range = true }
|
||||
)
|
||||
end,
|
||||
dependencies = {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
-- to show diff splits and open commits in browser
|
||||
'tpope/vim-fugitive',
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
'<leader>hb',
|
||||
function()
|
||||
require('telescope').extensions.advanced_git_search.diff_branch_file()
|
||||
end,
|
||||
desc = 'Diff file against branch'
|
||||
},
|
||||
{
|
||||
'<leader>hl',
|
||||
':DiffCommitLine<cr>gv',
|
||||
desc = 'Diff current line againt previous commits',
|
||||
mode = { 'x', 'n' },
|
||||
noremap = true
|
||||
},
|
||||
{
|
||||
'<leader>hf',
|
||||
function()
|
||||
require('telescope').extensions.advanced_git_search.diff_commit_file()
|
||||
end,
|
||||
desc = 'Diff current file against previous commits'
|
||||
},
|
||||
{
|
||||
'<leader>ha',
|
||||
function()
|
||||
require('telescope').extensions.advanced_git_search.search_log_content()
|
||||
end,
|
||||
desc = 'Search git log'
|
||||
},
|
||||
{
|
||||
'<leader>hs',
|
||||
function()
|
||||
require('telescope').extensions.advanced_git_search.search_log_content_file()
|
||||
end,
|
||||
desc = 'Search git log that changed current file'
|
||||
},
|
||||
{
|
||||
'<leader>hr',
|
||||
function()
|
||||
require('telescope').extensions.advanced_git_search.checkout_reflog()
|
||||
end,
|
||||
desc = 'Search all reflog entries'
|
||||
},
|
||||
{
|
||||
'<leader>hh',
|
||||
function()
|
||||
require('telescope').extensions.advanced_git_search.show_custom_functions()
|
||||
end,
|
||||
desc = 'Shwo all git telecope functions'
|
||||
}
|
||||
}
|
||||
}
|
27
lua/plugins/aerial.lua
Normal file
27
lua/plugins/aerial.lua
Normal file
@ -0,0 +1,27 @@
|
||||
return {
|
||||
'stevearc/aerial.nvim',
|
||||
dependencies = {
|
||||
'nvim-telescope/telescope.nvim'
|
||||
},
|
||||
config = function()
|
||||
require('aerial').setup({
|
||||
backends = { 'lsp', 'treesitter', 'markdown' },
|
||||
layout = {
|
||||
default_direction = 'prefer_left'
|
||||
},
|
||||
filter_kind = false,
|
||||
show_guides = true,
|
||||
})
|
||||
require('telescope').load_extension('aerial')
|
||||
end,
|
||||
cmd = 'AerialToggle',
|
||||
keys = {
|
||||
{
|
||||
'<leader>s',
|
||||
function()
|
||||
require('aerial').toggle()
|
||||
end,
|
||||
desc = 'Symbols outline',
|
||||
}
|
||||
}
|
||||
}
|
37
lua/plugins/cmake-tools.lua
Normal file
37
lua/plugins/cmake-tools.lua
Normal file
@ -0,0 +1,37 @@
|
||||
return {
|
||||
'Civitasv/cmake-tools.nvim',
|
||||
opts = {
|
||||
cmake_command = 'cmake',
|
||||
cmake_generate_options = { '-D', 'CMAKE_EXPORT_COMPILE_COMMANDS=1', '-G', 'Ninja' },
|
||||
cmake_show_console = 'always',
|
||||
cmake_build_directory = 'build_nvim',
|
||||
cmake_dap_configuration = { name = 'cpp', type = 'codelldb', request = 'launch' }, -- dap configuration, optional
|
||||
},
|
||||
cmd = {
|
||||
'CMakeGenerate',
|
||||
'CMakeBuild',
|
||||
'CMakeRun',
|
||||
'CMakeDebug',
|
||||
'CMakeSelectBuildType',
|
||||
'CMakeSelectBuildTarget',
|
||||
'CMakeSelectLaunchTarget',
|
||||
'CMakeSelectKit',
|
||||
'CMakeSelectConfigurePreset',
|
||||
'CMakeSelectBuildPreset',
|
||||
'CMakeSelectLaunchTarget',
|
||||
'CMakeOpen',
|
||||
'CMakeClose',
|
||||
'CMakeInstall',
|
||||
'CMakeClean',
|
||||
'CMakeStop',
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
'<S-F6>',
|
||||
function()
|
||||
require('cmake-tools').debug({})
|
||||
end,
|
||||
desc = 'Run and debug target from cmake'
|
||||
}
|
||||
}
|
||||
}
|
178
lua/plugins/cmp.lua
Normal file
178
lua/plugins/cmp.lua
Normal file
@ -0,0 +1,178 @@
|
||||
return {
|
||||
'hrsh7th/nvim-cmp',
|
||||
dependencies = {
|
||||
{ 'onsails/lspkind-nvim' },
|
||||
{ 'hrsh7th/cmp-buffer' },
|
||||
{ 'hrsh7th/cmp-nvim-lsp' },
|
||||
{ 'L3MON4D3/LuaSnip' },
|
||||
{ 'saadparwaiz1/cmp_luasnip' },
|
||||
{ 'hrsh7th/cmp-nvim-lua' },
|
||||
{ 'octaltree/cmp-look' },
|
||||
{ 'hrsh7th/cmp-path' },
|
||||
{ 'hrsh7th/cmp-calc' },
|
||||
{ 'f3fora/cmp-spell' },
|
||||
{ 'hrsh7th/cmp-emoji' },
|
||||
{ 'hrsh7th/cmp-cmdline' },
|
||||
{ 'dmitmel/cmp-cmdline-history' },
|
||||
{ 'ray-x/cmp-treesitter' },
|
||||
{ 'hrsh7th/cmp-nvim-lsp-signature-help' },
|
||||
{ 'p00f/clangd_extensions.nvim' },
|
||||
{
|
||||
'windwp/nvim-autopairs',
|
||||
config = true,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local cmp = require('cmp')
|
||||
local luasnip = require('luasnip')
|
||||
|
||||
local t = function(str)
|
||||
return vim.api.nvim_replace_termcodes(str, true, true, true)
|
||||
end
|
||||
|
||||
cmp.setup({
|
||||
formatting = {
|
||||
format = require('lspkind').cmp_format({
|
||||
mode = 'symbol_text', -- show only symbol annotations
|
||||
maxwidth = 80, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
|
||||
ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
|
||||
})
|
||||
},
|
||||
mapping = {
|
||||
['<Up>'] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c', 's' }),
|
||||
['<Down>'] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c', 's' }),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c', 's' }),
|
||||
['<C-e>'] = cmp.mapping(cmp.mapping.close(), { 'i', 'c', 's' }),
|
||||
['<CR>'] = cmp.mapping({
|
||||
i = function(fallback)
|
||||
if cmp.visible() and cmp.get_active_entry() then
|
||||
cmp.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false })
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
c = cmp.mapping.confirm({ select = false }),
|
||||
s = cmp.mapping.confirm({ select = false }),
|
||||
}),
|
||||
['<Tab>'] = cmp.mapping(function(fallback)
|
||||
if luasnip.expand_or_jumpable() then
|
||||
vim.api.nvim_feedkeys(t('<Plug>luasnip-expand-or-jump'), '', true)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, {
|
||||
'i',
|
||||
's',
|
||||
}),
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if luasnip.jumpable(-1) then
|
||||
vim.api.nvim_feedkeys(t('<Plug>luasnip-jump-prev'), '', true)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { 'i', 's', }),
|
||||
['<c-x>'] = cmp.mapping(cmp.mapping.complete(
|
||||
{
|
||||
config = {
|
||||
sources = {
|
||||
{
|
||||
name = 'cmdline_history'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
), { 'c' }),
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
sources = {
|
||||
{ name = 'luasnip', priority = 8 },
|
||||
{ name = 'nvim_lsp', priority = 7 },
|
||||
{ name = 'nvim_lsp_signature_help', priority = 7 },
|
||||
{ name = 'treesitter', priority = 6 },
|
||||
{
|
||||
name = 'buffer',
|
||||
priority = 5,
|
||||
option = {
|
||||
get_bufnrs = function()
|
||||
local bufs = {}
|
||||
for _, win in ipairs(vim.api.nvim_list_wins()) do
|
||||
bufs[vim.api.nvim_win_get_buf(win)] = true
|
||||
end
|
||||
return vim.tbl_keys(bufs)
|
||||
end
|
||||
}
|
||||
},
|
||||
-- { name = 'nvim_lua' },
|
||||
-- { name = 'look' },
|
||||
-- { name = 'path' },
|
||||
-- { name = 'cmp_tabnine' },
|
||||
-- { name = 'calc' },
|
||||
-- { name = 'spell' },
|
||||
-- { name = 'emoji' },
|
||||
},
|
||||
enabled = function()
|
||||
return vim.api.nvim_buf_get_option(0, 'buftype') ~= 'prompt'
|
||||
or vim.api.nvim_buf_get_option(0, 'filetype') == 'dap-repl'
|
||||
or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_watches'
|
||||
or vim.api.nvim_buf_get_option(0, 'filetype') == 'dapui_hover'
|
||||
end,
|
||||
completion = { completeopt = 'menu,menuone,noinsert, noselect' },
|
||||
window = {
|
||||
-- completion = cmp.config.window.bordered(),
|
||||
-- documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
sorting = {
|
||||
comparators = {
|
||||
cmp.config.compare.offset,
|
||||
cmp.config.compare.exact,
|
||||
cmp.config.compare.recently_used,
|
||||
require('clangd_extensions.cmp_scores'),
|
||||
cmp.config.compare.kind,
|
||||
cmp.config.compare.sort_text,
|
||||
cmp.config.compare.length,
|
||||
cmp.config.compare.order,
|
||||
},
|
||||
},
|
||||
-- experimental = { native_menu = true }
|
||||
})
|
||||
|
||||
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline('/', {
|
||||
sources = {
|
||||
{ name = 'buffer' },
|
||||
},
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
sources = {
|
||||
{ name = 'cmdline' },
|
||||
-- { name = 'cmdline_history' },
|
||||
{ name = 'path' },
|
||||
{ name = 'buffer' },
|
||||
},
|
||||
})
|
||||
|
||||
require('cmp').setup.filetype({ 'dap-repl', 'dapui_watches', 'dapui_hover' }, {
|
||||
sources = {
|
||||
{ name = 'dap' },
|
||||
},
|
||||
})
|
||||
|
||||
-- Autopairs
|
||||
--require("nvim-autopairs.completion.cmp").setup({
|
||||
-- map_cr = true,
|
||||
-- map_complete = true,
|
||||
-- auto_select = true
|
||||
--})
|
||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } }))
|
||||
end,
|
||||
event = { 'InsertEnter', 'CmdLineEnter' },
|
||||
}
|
20
lua/plugins/comment.lua
Normal file
20
lua/plugins/comment.lua
Normal file
@ -0,0 +1,20 @@
|
||||
return {
|
||||
'numToStr/Comment.nvim',
|
||||
opts = {
|
||||
mappings = false,
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
'<c-c>',
|
||||
'<Plug>(comment_toggle_linewise_current)',
|
||||
desc = 'Toggle comment'
|
||||
},
|
||||
|
||||
{
|
||||
'<c-c>',
|
||||
'<Plug>(comment_toggle_linewise_visual)gv',
|
||||
mode = 'v',
|
||||
desc = 'Toggle comment'
|
||||
}
|
||||
}
|
||||
}
|
226
lua/plugins/dap.lua
Normal file
226
lua/plugins/dap.lua
Normal file
@ -0,0 +1,226 @@
|
||||
return {
|
||||
'mfussenegger/nvim-dap',
|
||||
dependencies = {
|
||||
'mfussenegger/nvim-dap-python',
|
||||
'theHamsta/nvim-dap-virtual-text',
|
||||
{
|
||||
'nvim-telescope/telescope-dap.nvim',
|
||||
dependencies = 'telescope.nvim',
|
||||
},
|
||||
'rcarriga/nvim-dap-ui',
|
||||
'rcarriga/cmp-dap',
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
'<F5>',
|
||||
function()
|
||||
require('dap').continue()
|
||||
end,
|
||||
desc = 'DAP start or continue'
|
||||
},
|
||||
{
|
||||
'<S-F5>',
|
||||
function()
|
||||
require('dap').run_last()
|
||||
end,
|
||||
desc = 'DAP run last'
|
||||
},
|
||||
{
|
||||
'<F6>',
|
||||
function()
|
||||
loadConfigs()
|
||||
end,
|
||||
desc = 'DAP configs'
|
||||
},
|
||||
{
|
||||
'<F7>',
|
||||
function()
|
||||
require('dap').goto_()
|
||||
end,
|
||||
desc = 'DAP goto'
|
||||
},
|
||||
{
|
||||
'<F8>',
|
||||
function()
|
||||
require('dap.ui.widgets').hover()
|
||||
end,
|
||||
desc = 'DAP Hover'
|
||||
},
|
||||
{
|
||||
'<F9>',
|
||||
function()
|
||||
require('dap').toggle_breakpoint()
|
||||
end,
|
||||
desc = 'DAP breakpoint'
|
||||
},
|
||||
{
|
||||
'<F10>',
|
||||
function()
|
||||
require('dap').step_over()
|
||||
end,
|
||||
desc = 'DAP step_over'
|
||||
},
|
||||
{
|
||||
'<F11>',
|
||||
function()
|
||||
require('dap').step_into()
|
||||
end,
|
||||
desc = 'DAP step_into'
|
||||
},
|
||||
{
|
||||
'<S-F11>',
|
||||
function()
|
||||
require('dap').step_out()
|
||||
end,
|
||||
desc = 'DAP step_out'
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local dap = require('dap')
|
||||
vim.fn.sign_define('DapBreakpoint', { text = '🛑', texthl = '', linehl = '', numhl = '' })
|
||||
require('cmp_dap').is_dap_buffer()
|
||||
|
||||
|
||||
-- make sure we can exit the terminal with esc
|
||||
vim.api.nvim_create_autocmd({ 'TermOpen' }, {
|
||||
pattern = { '*dap-terminal*' },
|
||||
callback = function()
|
||||
local opts = { noremap = true }
|
||||
vim.api.nvim_buf_set_keymap(0, 't', '<esc>', [[<C-\><C-n>]], opts)
|
||||
end
|
||||
})
|
||||
|
||||
local pythonVenv = require('utils.python_venv')
|
||||
|
||||
function loadConfigs()
|
||||
require('dap.ext.vscode').load_launchjs()
|
||||
-- Make sure we use the correct python env even for the configs from launch.json
|
||||
for _, config in pairs(dap.configurations.python) do
|
||||
config.pythonPath = pythonVenv.getPythonEnv()
|
||||
config.cwd = vim.fn.getcwd()
|
||||
end
|
||||
require 'telescope'.extensions.dap.configurations {}
|
||||
end
|
||||
|
||||
local masonpath = vim.fn.stdpath('data') .. '/mason'
|
||||
|
||||
-- PYTHON
|
||||
dap.adapters.python = {
|
||||
type = 'executable',
|
||||
command = masonpath .. '/packages/debugpy/venv/' .. pythonVenv.getVenvSuffix(),
|
||||
args = { '-m', 'debugpy.adapter' },
|
||||
options = {
|
||||
detached = true,
|
||||
},
|
||||
}
|
||||
|
||||
local dapui = require('dapui')
|
||||
dapui.setup()
|
||||
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
|
||||
|
||||
dap.configurations.python = {
|
||||
{
|
||||
type = 'python',
|
||||
request = 'launch',
|
||||
name = 'Launch file with venv',
|
||||
justMyCode = false,
|
||||
program = '${file}',
|
||||
cwd = vim.fn.getcwd(),
|
||||
pythonPath = pythonVenv.getPythonEnv
|
||||
},
|
||||
}
|
||||
|
||||
-- require('dap-python').setup('C:\\Users\\oli\\AppData\\Local\\nvim\\venv_debugpy\\Scripts\\python')
|
||||
-- table.insert(require('dap').configurations.python, {
|
||||
-- -- type = 'python',
|
||||
-- -- request = 'launch',
|
||||
-- -- name = 'My custom launch configuration',
|
||||
-- -- program = '${file}',
|
||||
-- justMyCode = false
|
||||
-- -- ... more options, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings
|
||||
-- })
|
||||
-- require('dap-python').setup('C:/Users/oli/AppData/Local/nvim-data/mason/packages/debugpy/venv/Scripts/python.exe')
|
||||
|
||||
-- CPP
|
||||
dap.adapters.codelldb = {
|
||||
type = 'server',
|
||||
port = '${port}',
|
||||
executable = {
|
||||
-- CHANGE THIS to your path!
|
||||
command = masonpath .. '/bin/codelldb.cmd',
|
||||
args = { '--port', '${port}' },
|
||||
|
||||
-- On windows you may have to uncomment this:
|
||||
detached = false,
|
||||
}
|
||||
}
|
||||
|
||||
dap.adapters.cppdbg = {
|
||||
id = 'cppdbg',
|
||||
type = 'executable',
|
||||
command = masonpath .. '/bin/OpenDebugAD7',
|
||||
}
|
||||
|
||||
dap.adapters.lldb = {
|
||||
type = 'executable',
|
||||
command = function()
|
||||
if vim.loop.os_uname().sysname == 'Linux' then
|
||||
return 'lldb-vscode'
|
||||
else
|
||||
return os.getenv('SCOOP') .. '/apps/llvm/current/bin/lldb-vscode.exe'
|
||||
end
|
||||
end,
|
||||
name = 'lldb'
|
||||
}
|
||||
|
||||
dap.configurations.cpp = {
|
||||
{
|
||||
name = 'Launch codelldb',
|
||||
type = 'codelldb',
|
||||
request = 'launch',
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build_nvim/', 'file')
|
||||
end,
|
||||
cwd = '${workspaceFolder}',
|
||||
stopOnEntry = false,
|
||||
},
|
||||
{
|
||||
name = 'Launch lldb',
|
||||
type = 'lldb',
|
||||
request = 'launch',
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build_nvim', 'file')
|
||||
end,
|
||||
cwd = '${workspaceFolder}',
|
||||
stopOnEntry = false,
|
||||
args = {},
|
||||
|
||||
-- 💀
|
||||
-- if you change `runInTerminal` to true, you might need to change the yama/ptrace_scope setting:
|
||||
--
|
||||
-- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
|
||||
--
|
||||
-- Otherwise you might get the following error:
|
||||
--
|
||||
-- Error on launch: Failed to attach to the target process
|
||||
--
|
||||
-- But you should be aware of the implications:
|
||||
-- https://www.kernel.org/doc/html/latest/admin-guide/LSM/Yama.html
|
||||
-- runInTerminal = false,
|
||||
},
|
||||
}
|
||||
|
||||
-- EXTENSIONS
|
||||
|
||||
require('nvim-dap-virtual-text').setup({})
|
||||
require('telescope').load_extension('dap')
|
||||
end,
|
||||
}
|
16
lua/plugins/diffview.lua
Normal file
16
lua/plugins/diffview.lua
Normal file
@ -0,0 +1,16 @@
|
||||
return {
|
||||
'sindrets/diffview.nvim',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim'
|
||||
},
|
||||
config = true,
|
||||
cmd = 'DiffviewOpen',
|
||||
keys = {
|
||||
{
|
||||
'<space>b',
|
||||
'<cmd>DiffviewOpen origin/develop...<cr>',
|
||||
desc = 'Diffview vs develop',
|
||||
},
|
||||
|
||||
}
|
||||
}
|
3
lua/plugins/dressing.lua
Normal file
3
lua/plugins/dressing.lua
Normal file
@ -0,0 +1,3 @@
|
||||
return {
|
||||
'stevearc/dressing.nvim'
|
||||
}
|
12
lua/plugins/gitsigns.lua
Normal file
12
lua/plugins/gitsigns.lua
Normal file
@ -0,0 +1,12 @@
|
||||
return {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
opts = {
|
||||
current_line_blame = false,
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 1000,
|
||||
ignore_whitespace = false,
|
||||
},
|
||||
}
|
||||
}
|
35
lua/plugins/gruvbox.lua
Normal file
35
lua/plugins/gruvbox.lua
Normal file
@ -0,0 +1,35 @@
|
||||
return {
|
||||
'ellisonleao/gruvbox.nvim',
|
||||
priority = 1000,
|
||||
config = function()
|
||||
local colors = require('gruvbox.palette').colors
|
||||
|
||||
require('gruvbox').setup({
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
bold = false,
|
||||
italic = {
|
||||
strings = false,
|
||||
comments = true,
|
||||
operators = false,
|
||||
folds = true,
|
||||
},
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
invert_intend_guides = false,
|
||||
palette_overrides = {},
|
||||
overrides = {
|
||||
['@lsp.type.parameter'] = { fg = colors.faded_purple },
|
||||
['@lsp.type.function'] = { fg = '#797df2' },
|
||||
['@lsp.type.method'] = { fg = '#797df2' },
|
||||
['@lsp.mod.readonly'] = { bold = true },
|
||||
},
|
||||
dim_inactive = true,
|
||||
transparent_mode = false,
|
||||
})
|
||||
-- vim.cmd('colorscheme gruvbox')
|
||||
end,
|
||||
enabled = true
|
||||
}
|
19
lua/plugins/gruvbox_flat.lua
Normal file
19
lua/plugins/gruvbox_flat.lua
Normal file
@ -0,0 +1,19 @@
|
||||
return {
|
||||
'eddyekofo94/gruvbox-flat.nvim',
|
||||
priority = 1000,
|
||||
config = function()
|
||||
local colors = require('gruvbox.colors')
|
||||
vim.g.gruvbox_flat_style = 'dark'
|
||||
vim.g.gruvbox_colors = {
|
||||
bg_search = 'purple',
|
||||
fg_search = 'black',
|
||||
}
|
||||
vim.g.gruvbox_theme = {
|
||||
Pmenu = { bg = 'bg_visual' },
|
||||
NormalFloat = { bg = 'bg_visual' }
|
||||
}
|
||||
vim.g.gruvbox_dark_float = false
|
||||
vim.cmd('colorscheme gruvbox-flat')
|
||||
end,
|
||||
enabled = false
|
||||
}
|
42
lua/plugins/gruvbox_material.lua
Normal file
42
lua/plugins/gruvbox_material.lua
Normal file
@ -0,0 +1,42 @@
|
||||
return {
|
||||
'sainnhe/gruvbox-material',
|
||||
priority = 1000,
|
||||
config = function()
|
||||
-- local colors = require('gruvbox.colors')
|
||||
-- vim.g.gruvbox_flat_style = "dark"
|
||||
-- vim.g.gruvbox_colors = {
|
||||
-- bg_search = 'purple',
|
||||
-- fg_search = 'black',
|
||||
-- }
|
||||
-- vim.g.gruvbox_theme = {
|
||||
-- Pmenu = { bg = 'bg_visual' },
|
||||
-- NormalFloat = { bg = 'bg_visual' }
|
||||
-- }
|
||||
-- vim.g.gruvbox_dark_float = false
|
||||
vim.g.gruvbox_material_ui_contrast = 'high'
|
||||
vim.g.gruvbox_material_dim_inactive_windows = 1 -- Dim inactive windows. Only works in neovim currently.
|
||||
vim.g.gruvbox_material_disable_terminal_colors = 0
|
||||
local links = {
|
||||
['@lsp.type.namespace'] = '@namespace',
|
||||
['@lsp.type.type'] = '@type',
|
||||
['@lsp.type.class'] = '@type',
|
||||
['@lsp.type.enum'] = '@type',
|
||||
['@lsp.type.interface'] = '@type',
|
||||
['@lsp.type.struct'] = '@structure',
|
||||
['@lsp.type.parameter'] = '@parameter',
|
||||
['@lsp.type.variable'] = '@variable',
|
||||
['@lsp.type.property'] = '@property',
|
||||
['@lsp.type.enumMember'] = '@constant',
|
||||
['@lsp.type.function'] = '@function',
|
||||
['@lsp.type.method'] = '@method',
|
||||
['@lsp.type.macro'] = '@macro',
|
||||
['@lsp.type.decorator'] = '@function',
|
||||
}
|
||||
-- for newgroup, oldgroup in pairs(links) do
|
||||
-- vim.api.nvim_set_hl(0, newgroup, { link = oldgroup, default = true })
|
||||
-- end
|
||||
vim.cmd('colorscheme gruvbox-material')
|
||||
vim.api.nvim_set_hl(0, '@lsp.mod.readonly', { italic = true, fg = 'Purple' })
|
||||
end,
|
||||
enabled = false
|
||||
}
|
20
lua/plugins/indent_blankline.lua
Normal file
20
lua/plugins/indent_blankline.lua
Normal file
@ -0,0 +1,20 @@
|
||||
return {
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
dependencies = {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
},
|
||||
opts = {
|
||||
show_end_of_line = true,
|
||||
use_treesitter = true,
|
||||
show_current_context = true,
|
||||
context_patterns = { 'class', 'function', 'method', 'block', '^if', '^for', '^while' },
|
||||
|
||||
},
|
||||
config = function()
|
||||
local opt = vim.opt -- to set options
|
||||
opt.listchars:append('eol:↴')
|
||||
-- opt.listchars:append("space: ")
|
||||
opt.listchars:append('trail: ')
|
||||
opt.listchars:append('tab:→ ')
|
||||
end,
|
||||
}
|
2
lua/plugins/init.lua
Normal file
2
lua/plugins/init.lua
Normal file
@ -0,0 +1,2 @@
|
||||
return {
|
||||
}
|
25
lua/plugins/lazygit.lua
Normal file
25
lua/plugins/lazygit.lua
Normal file
@ -0,0 +1,25 @@
|
||||
return {
|
||||
'kdheepak/lazygit.nvim',
|
||||
dependencies = {
|
||||
'nvim-telescope/telescope.nvim'
|
||||
},
|
||||
cmd = {
|
||||
'LazyGit',
|
||||
'LazyGitConfig',
|
||||
'LazyGitFilter',
|
||||
'LazyGitFilterCurrentFile',
|
||||
'LazyGit',
|
||||
},
|
||||
config = function()
|
||||
require('telescope').load_extension('lazygit')
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
'<Space>g',
|
||||
function()
|
||||
require('lazygit').lazygit()
|
||||
end,
|
||||
desc = 'LazyGit'
|
||||
}
|
||||
}
|
||||
}
|
8
lua/plugins/leap.lua
Normal file
8
lua/plugins/leap.lua
Normal file
@ -0,0 +1,8 @@
|
||||
return {
|
||||
'ggandor/leap.nvim',
|
||||
dependencies = { 'tpope/vim-repeat' },
|
||||
config = function()
|
||||
require('leap').set_default_keymaps()
|
||||
end,
|
||||
event = 'VeryLazy'
|
||||
}
|
14
lua/plugins/lsp_lines.lua
Normal file
14
lua/plugins/lsp_lines.lua
Normal file
@ -0,0 +1,14 @@
|
||||
return {
|
||||
'https://git.sr.ht/~whynothugo/lsp_lines.nvim',
|
||||
config = true,
|
||||
keys = {
|
||||
{
|
||||
'<space>l',
|
||||
function()
|
||||
require('lsp_lines').toggle()
|
||||
end,
|
||||
desc = 'Toggle lsp_lines',
|
||||
}
|
||||
},
|
||||
event = 'LspAttach'
|
||||
}
|
322
lua/plugins/lspconfig.lua
Normal file
322
lua/plugins/lspconfig.lua
Normal file
@ -0,0 +1,322 @@
|
||||
return {
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = {
|
||||
'williamboman/mason.nvim',
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
'p00f/clangd_extensions.nvim',
|
||||
'jose-elias-alvarez/null-ls.nvim',
|
||||
'ray-x/lsp_signature.nvim',
|
||||
{
|
||||
'folke/neodev.nvim',
|
||||
config = true,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require('mason').setup({
|
||||
ui = {
|
||||
border = 'rounded'
|
||||
}
|
||||
})
|
||||
require('mason-lspconfig').setup({
|
||||
automatic_installation = false,
|
||||
})
|
||||
local lspconfig = require 'lspconfig'
|
||||
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
vim.api.nvim_set_hl(
|
||||
0,
|
||||
'LspReferenceText',
|
||||
{
|
||||
bold = true,
|
||||
ctermbg = 'red',
|
||||
bg = '#5a524c'
|
||||
}
|
||||
)
|
||||
vim.api.nvim_set_hl(
|
||||
0,
|
||||
'LspReferenceRead',
|
||||
{
|
||||
bold = true,
|
||||
ctermbg = 'red',
|
||||
bg = 'DarkGreen'
|
||||
}
|
||||
)
|
||||
vim.api.nvim_set_hl(
|
||||
0,
|
||||
'LspReferenceWrite',
|
||||
{
|
||||
bold = true,
|
||||
ctermbg = 'red',
|
||||
bg = 'DarkRed'
|
||||
}
|
||||
)
|
||||
local diagnostics = {
|
||||
Error = ' ',
|
||||
Warning = ' ',
|
||||
Information = ' ',
|
||||
Question = ' ',
|
||||
Hint = ' ',
|
||||
}
|
||||
local signs = {
|
||||
{ name = 'DiagnosticSignError', text = diagnostics.Error },
|
||||
{ name = 'DiagnosticSignWarn', text = diagnostics.Warning },
|
||||
{ name = 'DiagnosticSignHint', text = diagnostics.Hint },
|
||||
{ name = 'DiagnosticSignInfo', text = diagnostics.Information },
|
||||
}
|
||||
|
||||
for _, sign in ipairs(signs) do
|
||||
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = sign.name })
|
||||
end
|
||||
|
||||
OpenDiagFloat = function()
|
||||
for _, winid in pairs(vim.api.nvim_tabpage_list_wins(0)) do
|
||||
if vim.api.nvim_win_get_config(winid).zindex then
|
||||
return
|
||||
end
|
||||
end
|
||||
vim.diagnostic.open_float({ focusable = false, width = 80 })
|
||||
end
|
||||
|
||||
local on_attach = function(client, bufnr)
|
||||
local function buf_set_option(...)
|
||||
vim.api.nvim_buf_set_option(bufnr, ...)
|
||||
end
|
||||
|
||||
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
vim.api.nvim_buf_set_option(0, 'formatexpr', 'v:lua.vim.lsp.formatexpr()')
|
||||
|
||||
-- Mappings.
|
||||
local tele_builtins = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<space>,', vim.diagnostic.goto_prev,
|
||||
{ noremap = true, silent = false, desc = 'Diag prev', buffer = bufnr })
|
||||
vim.keymap.set('n', '<space>;', vim.diagnostic.goto_next,
|
||||
{ noremap = true, silent = false, desc = 'Diag next', buffer = bufnr })
|
||||
vim.keymap.set('n', '<space>a', vim.lsp.buf.code_action,
|
||||
{ noremap = true, silent = false, desc = 'Code action', buffer = bufnr })
|
||||
vim.keymap.set('n', '<space>d', tele_builtins.lsp_definitions,
|
||||
{ noremap = true, silent = false, desc = 'Definition', buffer = bufnr })
|
||||
vim.keymap.set('n', '<space>e', vim.lsp.buf.declaration,
|
||||
{ noremap = true, silent = false, desc = 'Declaration', buffer = bufnr })
|
||||
vim.keymap.set('n', '<space>h', vim.lsp.buf.hover,
|
||||
{ noremap = true, silent = false, desc = 'Hover', buffer = bufnr })
|
||||
vim.keymap.set('n', '<space>c', vim.lsp.buf.outgoing_calls,
|
||||
{ noremap = true, silent = false, desc = 'Outgoing calls', buffer = bufnr })
|
||||
vim.keymap.set('n', '<space>C', vim.lsp.buf.incoming_calls,
|
||||
{ noremap = true, silent = false, desc = 'Incoming calls', buffer = bufnr })
|
||||
vim.keymap.set('n', '<space>m', vim.lsp.buf.rename,
|
||||
{ noremap = true, silent = false, desc = 'Rename', buffer = bufnr })
|
||||
vim.keymap.set('n', '<C-t>', tele_builtins.lsp_dynamic_workspace_symbols,
|
||||
{ noremap = true, silent = false, desc = 'Workspace symbols', buffer = bufnr })
|
||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition,
|
||||
{ noremap = true, silent = false, desc = 'Type definition', buffer = bufnr })
|
||||
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help,
|
||||
{ noremap = true, silent = false, desc = 'Signature help', buffer = bufnr })
|
||||
vim.keymap.set('n', '<space>r', tele_builtins.lsp_references,
|
||||
{ noremap = true, silent = false, desc = 'References', buffer = bufnr })
|
||||
vim.keymap.set('n', '<A-m>', tele_builtins.lsp_document_symbols,
|
||||
{ noremap = true, silent = false, desc = 'References', buffer = bufnr })
|
||||
vim.keymap.set('n', '<scapce>s', tele_builtins.lsp_dynamic_workspace_symbols,
|
||||
{ noremap = true, silent = false, desc = 'Workspace symbols', buffer = bufnr })
|
||||
vim.keymap.set('n', '<space>v', function() tele_builtins.diagnostics({ bufnr = 0 }) end,
|
||||
{ noremap = true, silent = false, desc = 'Diagnostics', buffer = bufnr })
|
||||
vim.keymap.set('n', '<A-o>', '<cmd>ClangdSwitchSourceHeader<CR>',
|
||||
{ noremap = true, silent = false, desc = 'Switch Source/Header', buffer = bufnr })
|
||||
|
||||
|
||||
-- Set some keybinds conditional on server capabilities
|
||||
if client.server_capabilities.documentFormattingProvider then
|
||||
vim.keymap.set('n', '<space>f', function()
|
||||
vim.lsp.buf.format({ timeout_ms = 10000 })
|
||||
end,
|
||||
{ noremap = true, silent = false, desc = 'Format file', buffer = bufnr })
|
||||
end
|
||||
if client.server_capabilities.documentRangeFormattingProvider then
|
||||
vim.keymap.set('x', '<space>f', function()
|
||||
vim.lsp.buf.format({ timeout_ms = 10000 })
|
||||
end,
|
||||
{ noremap = true, silent = false, desc = 'Format visual', buffer = bufnr })
|
||||
end
|
||||
|
||||
-- Set autocommands conditional on server_capabilities
|
||||
if client.server_capabilities.documentHighlightProvider then
|
||||
local group = vim.api.nvim_create_augroup('lsp_document_highlight', { clear = false })
|
||||
vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
||||
callback = function()
|
||||
vim.lsp.buf.document_highlight()
|
||||
end,
|
||||
buffer = bufnr,
|
||||
group = group,
|
||||
desc = 'Document Highlight',
|
||||
})
|
||||
vim.api.nvim_create_autocmd('CursorMoved', {
|
||||
callback = function()
|
||||
vim.lsp.buf.clear_references()
|
||||
end,
|
||||
buffer = bufnr,
|
||||
group = group,
|
||||
desc = 'Clear All the References',
|
||||
})
|
||||
vim.api.nvim_create_autocmd({ 'LspDetach' }, {
|
||||
group = group,
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
vim.lsp.buf.clear_references()
|
||||
vim.api.nvim_clear_autocmds {
|
||||
group = group,
|
||||
buffer = bufnr
|
||||
}
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
require('lsp_signature').on_attach({
|
||||
bind = true, -- This is mandatory, otherwise border config won't get registered.
|
||||
handler_opts = {
|
||||
border = 'single',
|
||||
},
|
||||
hi_parameter = 'IncSearch',
|
||||
}, bufnr)
|
||||
end
|
||||
|
||||
lspconfig['pyright'].setup {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
}
|
||||
|
||||
lspconfig['groovyls'].setup {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
}
|
||||
|
||||
-- lspconfig['cmake'].setup {
|
||||
-- capabilities = capabilities,
|
||||
-- on_attach = on_attach,
|
||||
-- }
|
||||
|
||||
local configs = require('lspconfig.configs')
|
||||
if not configs.neocmake then
|
||||
configs.neocmake = {
|
||||
default_config = {
|
||||
cmd = { 'neocmakelsp', '--stdio' },
|
||||
filetypes = { 'cmake' },
|
||||
root_dir = function(fname)
|
||||
return lspconfig.util.find_git_ancestor(fname)
|
||||
end,
|
||||
single_file_support = true, -- suggested
|
||||
on_attach = on_attach -- on_attach is the on_attach function you defined
|
||||
}
|
||||
}
|
||||
lspconfig.neocmake.setup({})
|
||||
end
|
||||
|
||||
local clangd_capabilities = capabilities
|
||||
clangd_capabilities.textDocument.semanticHighlighting = true
|
||||
clangd_capabilities.offsetEncoding = { 'utf-16' }
|
||||
require('clangd_extensions').setup {
|
||||
server = {
|
||||
capabilities = clangd_capabilities,
|
||||
on_attach = on_attach,
|
||||
cmd = { 'clangd', '--compile-commands-dir=build_nvim', '--query-driver',
|
||||
'/opt/cortex-a78-2022.08-gcc12.1-linux5.15/bin/aarch64-linux-gnu-g*' },
|
||||
root_dir = lspconfig.util.root_pattern(
|
||||
'.clangd',
|
||||
'.clang-tidy',
|
||||
'.clang-format',
|
||||
'compile_flags.txt',
|
||||
'configure.ac',
|
||||
'.git',
|
||||
'build_nvim'
|
||||
)
|
||||
},
|
||||
extensions =
|
||||
{
|
||||
inlay_hints = {
|
||||
-- Only show inlay hints for the current line
|
||||
only_current_line = true,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lspconfig['jsonls'].setup {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
}
|
||||
|
||||
local lua_rtp = vim.split(package.path, ';')
|
||||
table.insert(lua_rtp, 'lua/?.lua')
|
||||
table.insert(lua_rtp, 'lua/?/init.lua')
|
||||
lspconfig.lua_ls.setup {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||
version = 'LuaJIT',
|
||||
-- Setup your lua path
|
||||
path = lua_rtp,
|
||||
},
|
||||
diagnostics = {
|
||||
-- Get the language server to recognize the `vim` global
|
||||
globals = { 'vim' },
|
||||
},
|
||||
workspace = {
|
||||
-- Make the server aware of Neovim runtime files
|
||||
library = vim.api.nvim_get_runtime_file('', true),
|
||||
checkThirdParty = false,
|
||||
},
|
||||
-- Do not send telemetry data containing a randomized but unique identifier
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
format = {
|
||||
enable = true,
|
||||
defaultConfig = {
|
||||
indent_style = 'space',
|
||||
indent_size = '2',
|
||||
quote_style = 'single',
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
lspconfig['dockerls'].setup {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
}
|
||||
|
||||
lspconfig['yamlls'].setup {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
yaml = {
|
||||
validate = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local null_ls = require('null-ls')
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.code_actions.gitsigns,
|
||||
-- null_ls.builtins.formatting.black,
|
||||
null_ls.builtins.formatting.autopep8,
|
||||
null_ls.builtins.formatting.prettier,
|
||||
null_ls.builtins.formatting.xmlformat,
|
||||
null_ls.builtins.diagnostics.flake8,
|
||||
null_ls.builtins.formatting.isort,
|
||||
null_ls.builtins.formatting.cmake_format,
|
||||
},
|
||||
debug = true,
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- vim.diagnostic.config({ virtual_text = false })
|
||||
vim.diagnostic.config({ virtual_text = false, virtual_lines = { only_current_line = true } })
|
||||
end,
|
||||
event = 'VeryLazy'
|
||||
}
|
126
lua/plugins/lualine.lua
Normal file
126
lua/plugins/lualine.lua
Normal file
@ -0,0 +1,126 @@
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
config = function()
|
||||
local custom_gruvbox = require 'lualine.themes.gruvbox_dark'
|
||||
|
||||
-- Change the background of lualine_c section for normal mode
|
||||
custom_gruvbox.normal.a.bg = '#282828'
|
||||
custom_gruvbox.normal.b.bg = '#282828'
|
||||
custom_gruvbox.normal.c.bg = '#282828'
|
||||
-- custom_gruvbox.normal.a.fg = '#282828'
|
||||
-- custom_gruvbox.normal.b.fg = '#282828'
|
||||
-- custom_gruvbox.normal.c.fg = '#282828'
|
||||
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
-- theme = custom_gruvbox,
|
||||
theme = 'gruvbox_dark',
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = { 'dap-repl', 'dapui_console' },
|
||||
},
|
||||
},
|
||||
globalstatus = true,
|
||||
extensions = { 'aerial' },
|
||||
sections = {
|
||||
lualine_b = {
|
||||
'branch',
|
||||
'diff',
|
||||
{
|
||||
'diagnostics',
|
||||
sources = { 'nvim_diagnostic' }
|
||||
}
|
||||
},
|
||||
lualine_c = {
|
||||
'hostname',
|
||||
'getcwd',
|
||||
{ 'filename', path = 1, file_status = true }
|
||||
},
|
||||
lualine_y = {
|
||||
'searchcount',
|
||||
'progress'
|
||||
},
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_c = {
|
||||
'getcwd',
|
||||
{
|
||||
'filename',
|
||||
path = 1,
|
||||
file_status = true
|
||||
}
|
||||
}
|
||||
},
|
||||
winbar = {
|
||||
lualine_a = {
|
||||
{
|
||||
'filename',
|
||||
path = 0,
|
||||
file_status = true,
|
||||
separator = { left = '', right = '' },
|
||||
-- color = { fg = '#ffaa88', gui = 'bold' }
|
||||
color = { fg = '#ffaa88', bg = '#282828', gui = 'bold' }
|
||||
}
|
||||
},
|
||||
lualine_b = {
|
||||
{
|
||||
'filesize',
|
||||
color = { bg = '#282828' }
|
||||
}
|
||||
},
|
||||
lualine_c = {
|
||||
{
|
||||
'aerial',
|
||||
color = { fg = '#ebdbb2', bg = '#282828', gui = 'bold' }
|
||||
}
|
||||
},
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = {
|
||||
}
|
||||
},
|
||||
inactive_winbar = {
|
||||
lualine_a = {
|
||||
{
|
||||
'filename',
|
||||
path = 0,
|
||||
file_status = true,
|
||||
separator = { left = '', right = '' },
|
||||
color = { fg = '#ffaa88', bg = '#282828', gui = 'bold' }
|
||||
-- color = { fg = '#ffaa88', bg = 'grey', gui = 'italic,bold' }
|
||||
-- color = { fg = '#ff1111'}
|
||||
}
|
||||
},
|
||||
lualine_b = {
|
||||
{
|
||||
'filesize',
|
||||
color = { bg = '#282828' }
|
||||
}
|
||||
},
|
||||
lualine_c = { 'aerial' },
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
tabline = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {
|
||||
{
|
||||
'tabs',
|
||||
mode = 2,
|
||||
tabs_color = {
|
||||
-- Same values as the general color option can be used here.
|
||||
active = 'lualine_a_normal', -- Color for active tab.
|
||||
inactive = 'lualine_a_inactive', -- Color for inactive tab.
|
||||
},
|
||||
}
|
||||
},
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
}
|
||||
end
|
||||
}
|
66
lua/plugins/luasnip.lua
Normal file
66
lua/plugins/luasnip.lua
Normal file
@ -0,0 +1,66 @@
|
||||
return {
|
||||
'L3MON4D3/LuaSnip',
|
||||
config = function()
|
||||
local ls = require('luasnip')
|
||||
-- some shorthands...
|
||||
local s = ls.snippet
|
||||
local sn = ls.snippet_node
|
||||
local isn = ls.indent_snippet_node
|
||||
local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
local f = ls.function_node
|
||||
local c = ls.choice_node
|
||||
local d = ls.dynamic_node
|
||||
local r = ls.restore_node
|
||||
local l = require('luasnip.extras').lambda
|
||||
local rep = require('luasnip.extras').rep
|
||||
local p = require('luasnip.extras').partial
|
||||
local m = require('luasnip.extras').match
|
||||
local n = require('luasnip.extras').nonempty
|
||||
local dl = require('luasnip.extras').dynamic_lambda
|
||||
local fmt = require('luasnip.extras.fmt').fmt
|
||||
local fmta = require('luasnip.extras.fmt').fmta
|
||||
local types = require('luasnip.util.types')
|
||||
local conds = require('luasnip.extras.expand_conditions')
|
||||
|
||||
local function getRegA(capitalize)
|
||||
local clipboard = vim.fn.getreg('a')
|
||||
clipboard = clipboard:gsub('^m_', '')
|
||||
if capitalize then
|
||||
clipboard = clipboard:gsub('^%l', string.upper)
|
||||
end
|
||||
return clipboard
|
||||
end
|
||||
|
||||
ls.snippets = {
|
||||
cpp = {
|
||||
s('TEST_F_getset',
|
||||
{
|
||||
t('TEST_F('), i(1, 'TestClass'), t(' ,test_'), p(getRegA, false), t({ '_set_get)', '{', ' ' }),
|
||||
i(2, 'm_object'), t('.set'), p(getRegA, true), t('('), i(3, '32.F'), t({ ');', ' ' }),
|
||||
i(4, 'EXPECT_EQ('), rep(3), t(', '), rep(2), t('.get'), p(getRegA, true), t({ '());', '' }),
|
||||
t({ '', '}', '' })
|
||||
}),
|
||||
s('TEST_fn_getset',
|
||||
{
|
||||
t('void '), p(getRegA, false), t('_'), i(1, 'get'), t('_'), i(2, 'set'), t({ '()', '{', ' ' }),
|
||||
i(3, 'm_object'), t('.set'), p(getRegA, true), t('('), i(4, '32.F'), t({ ');', ' ' }),
|
||||
i(5, 'EXPECT_EQ('), rep(4), t(', '), rep(3), t('.get'), p(getRegA, true), t({ '());', '' }),
|
||||
t({ '', '}', '', '' }),
|
||||
|
||||
t('TEST_F('), i(5), t(' ,test_'), p(getRegA, false), t({ '_set_get)', '{', ' ' }),
|
||||
p(getRegA, false), t('_'), rep(1), t('_'), rep(2), t({ '();' }),
|
||||
t({ '', '}' }),
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
require('luasnip.loaders.from_vscode').lazy_load()
|
||||
require('luasnip.loaders.from_vscode').lazy_load({ paths = { './my-snippets' } })
|
||||
end,
|
||||
dependencies =
|
||||
{
|
||||
'rafamadriz/friendly-snippets'
|
||||
},
|
||||
cmd = 'LuaSnipListAvailable'
|
||||
}
|
73
lua/plugins/material.lua
Normal file
73
lua/plugins/material.lua
Normal file
@ -0,0 +1,73 @@
|
||||
return {
|
||||
'marko-cerovac/material.nvim',
|
||||
priority = 1000,
|
||||
config = function()
|
||||
local colors = require 'material.colors'
|
||||
require('material').setup({
|
||||
|
||||
contrast = {
|
||||
terminal = false, -- Enable contrast for the built-in terminal
|
||||
sidebars = false, -- Enable contrast for sidebar-like windows ( for example Nvim-Tree )
|
||||
floating_windows = true, -- Enable contrast for floating windows
|
||||
cursor_line = false, -- Enable darker background for the cursor line
|
||||
non_current_windows = true, -- Enable darker background for non-current windows
|
||||
filetypes = {}, -- Specify which filetypes get the contrasted (darker) background
|
||||
},
|
||||
|
||||
styles = { -- Give comments style such as bold, italic, underline etc.
|
||||
comments = { --[[ italic = true ]] },
|
||||
strings = { --[[ bold = true ]] },
|
||||
keywords = { --[[ underline = true ]] },
|
||||
functions = { --[[ bold = true, undercurl = true ]] },
|
||||
variables = {},
|
||||
operators = {},
|
||||
types = {},
|
||||
},
|
||||
|
||||
plugins = { -- Uncomment the plugins that you use to highlight them
|
||||
-- Available plugins:
|
||||
"dap",
|
||||
-- "dashboard",
|
||||
"gitsigns",
|
||||
-- "hop",
|
||||
"indent-blankline",
|
||||
-- "lspsaga",
|
||||
-- "mini",
|
||||
-- "neogit",
|
||||
-- "neorg",
|
||||
"nvim-cmp",
|
||||
"nvim-navic",
|
||||
-- "nvim-tree",
|
||||
"nvim-web-devicons",
|
||||
-- "sneak",
|
||||
"telescope",
|
||||
-- "trouble",
|
||||
"which-key",
|
||||
},
|
||||
|
||||
disable = {
|
||||
colored_cursor = false, -- Disable the colored cursor
|
||||
borders = false, -- Disable borders between verticaly split windows
|
||||
background = false, -- Prevent the theme from setting the background (NeoVim then uses your terminal background)
|
||||
term_colors = false, -- Prevent the theme from setting terminal colors
|
||||
eob_lines = false -- Hide the end-of-buffer lines
|
||||
},
|
||||
|
||||
high_visibility = {
|
||||
lighter = false, -- Enable higher contrast text for lighter style
|
||||
darker = true-- Enable higher contrast text for darker style
|
||||
},
|
||||
|
||||
lualine_style = 'default', -- Lualine style ( can be 'stealth' or 'default' )
|
||||
|
||||
async_loading = true, -- Load parts of the theme asyncronously for faster startup (turned on by default)
|
||||
|
||||
custom_colors = nil, -- If you want to everride the default colors, set this to a function
|
||||
|
||||
custom_highlights = {}, -- Overwrite highlights with your own
|
||||
})
|
||||
vim.g.material_style = "darker"
|
||||
vim.cmd('colorscheme material')
|
||||
end,
|
||||
enabled = false
|
||||
}
|
62
lua/plugins/monokai-pro.lua
Normal file
62
lua/plugins/monokai-pro.lua
Normal file
@ -0,0 +1,62 @@
|
||||
return {
|
||||
'loctvl842/monokai-pro.nvim',
|
||||
config = function()
|
||||
require('monokai-pro').setup({
|
||||
-- filter = 'spectrum'
|
||||
override = function(c)
|
||||
return {
|
||||
['@lsp.type.class'] = { link = 'Structure' },
|
||||
['@lsp.type.decorator'] = { link = 'Function' },
|
||||
['@lsp.type.enum'] = { link = 'Structure' },
|
||||
['@lsp.type.enumNumber'] = { link = 'Constant' },
|
||||
['@lsp.type.function'] = { link = 'Function' },
|
||||
['@lsp.type.interface'] = { link = 'Structure' },
|
||||
['@lsp.type.macro'] = { link = 'Macro' },
|
||||
-- ['@lsp.type.method'] = { link = 'Function' },
|
||||
['@lsp.type.namespace'] = { link = 'Identifier' },
|
||||
['@lsp.type.parameter'] = { link = '@lsp.typemod.parameter.declaration' },
|
||||
['@lsp.type.property'] = { link = 'Identifier' },
|
||||
['@lsp.type.struct'] = { link = 'Structure' },
|
||||
['@lsp.type.type'] = { link = 'Type' },
|
||||
['@lsp.type.typeParameter'] = { link = 'TypeDef' },
|
||||
['@lsp.type.variable'] = { link = 'Identifier' },
|
||||
|
||||
-- mod
|
||||
-- ["@lsp.mod.declaration"] = { fg = c.base.cyan },
|
||||
-- ["@lsp.mod.definition"] = { fg = c.base.cyan },
|
||||
-- ["@lsp.mod.readonly"] = { fg = c.base.magenta },
|
||||
-- ["@lsp.mod.static"] = {},
|
||||
['@lsp.mod.deprecated'] = { strikethrough = true },
|
||||
-- ["@lsp.mod.abstract"] = {},
|
||||
-- ["@lsp.mod.async"] = {},
|
||||
-- ["@lsp.mod.modification"] = {},
|
||||
-- ["@lsp.mod.documentation"] = {},
|
||||
-- ["@lsp.mod.defaultLibrary"] = {},
|
||||
|
||||
['@lsp.typemod.class.defaultLibrary'] = { fg = c.base.white },
|
||||
-- ["@lsp.typemod.decorator"] = {},
|
||||
-- ["@lsp.typemod.enum"] = {},
|
||||
-- ["@lsp.typemod.enumNumber"] = {},
|
||||
['@lsp.typemod.function.declaration'] = { fg = c.base.green },
|
||||
['@lsp.typemod.function.defaultLibrary'] = { fg = c.base.blue },
|
||||
-- ["@lsp.typemod.interface"] = {},
|
||||
-- ["@lsp.typemod.macro"] = {},
|
||||
-- ["@lsp.typemod.method"] = {},
|
||||
["@lsp.typemod.namespace"] = { fg = c.base.red },
|
||||
-- ['@lsp.typemod.parameter.declaration'] = { fg = c.base.blue, italic = styles.parameter.italic },
|
||||
["@lsp.typemod.property"] = { fg = '#9699f2' },
|
||||
-- ["@lsp.typemod.struct"] = {},
|
||||
-- ["@lsp.typemod.type"] = {},
|
||||
-- ["@lsp.typemod.typeParameter"] = {},
|
||||
['@lsp.typemod.variable.readonly'] = { fg = c.base.magenta },
|
||||
|
||||
-- ['@lsp.type.parameter'] = { fg = '#797df2' },
|
||||
-- ['@lsp.type.function'] = { fg = '#797df2' },
|
||||
-- ['@lsp.type.method'] = { fg = '#797df2' },
|
||||
['@lsp.mod.readonly'] = { bold = true },
|
||||
}
|
||||
end,
|
||||
})
|
||||
vim.cmd('colorscheme monokai-pro')
|
||||
end
|
||||
}
|
59
lua/plugins/navbuddy.lua
Normal file
59
lua/plugins/navbuddy.lua
Normal file
@ -0,0 +1,59 @@
|
||||
return {
|
||||
'SmiteshP/nvim-navbuddy',
|
||||
dependencies = {
|
||||
'neovim/nvim-lspconfig',
|
||||
'SmiteshP/nvim-navic',
|
||||
'MunifTanjim/nui.nvim'
|
||||
},
|
||||
config = function()
|
||||
local actions = require('nvim-navbuddy.actions')
|
||||
local navbuddy = require('nvim-navbuddy')
|
||||
navbuddy.setup {
|
||||
mappings = {
|
||||
['<esc>'] = actions.close, -- Close and cursor to original location
|
||||
['q'] = actions.close,
|
||||
['j'] = actions.next_sibling, -- down
|
||||
['k'] = actions.previous_sibling, -- up
|
||||
['h'] = actions.parent, -- Move to left panel
|
||||
['l'] = actions.children, -- Move to right panel
|
||||
['v'] = actions.visual_name, -- Visual selection of name
|
||||
['V'] = actions.visual_scope, -- Visual selection of scope
|
||||
['y'] = actions.yank_name, -- Yank the name to system clipboard "+
|
||||
['Y'] = actions.yank_scope, -- Yank the scope to system clipboard "+
|
||||
['i'] = actions.insert_name, -- Insert at start of name
|
||||
['I'] = actions.insert_scope, -- Insert at start of scope
|
||||
['a'] = actions.append_name, -- Insert at end of name
|
||||
['A'] = actions.append_scope, -- Insert at end of scope
|
||||
['r'] = actions.rename, -- Rename currently focused symbol
|
||||
['d'] = actions.delete, -- Delete scope
|
||||
['f'] = actions.fold_create, -- Create fold of current scope
|
||||
['F'] = actions.fold_delete, -- Delete fold of current scope
|
||||
['c'] = actions.comment, -- Comment out current scope
|
||||
['<enter>'] = actions.select, -- Goto selected symbol
|
||||
['o'] = actions.select,
|
||||
['J'] = actions.move_down, -- Move focused node down
|
||||
['K'] = actions.move_up, -- Move focused node up
|
||||
['<down>'] = actions.next_sibling, -- down
|
||||
['<uo>'] = actions.previous_sibling, -- up
|
||||
['<left>'] = actions.parent, -- Move to left panel
|
||||
['<right>'] = actions.children, -- Move to right panel
|
||||
['<S-down>'] = actions.move_down, -- Move focused node down
|
||||
['<S-up>'] = actions.move_up, -- Move focused node up
|
||||
},
|
||||
lsp = {
|
||||
auto_attach = true, -- If set to true, you don't need to manually use attach function
|
||||
},
|
||||
}
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
'<Space>n',
|
||||
function()
|
||||
require('nvim-navbuddy').open()
|
||||
end,
|
||||
desc = 'Navbuddy'
|
||||
},
|
||||
},
|
||||
cmd = 'Navbuddy',
|
||||
event = 'LspAttach'
|
||||
}
|
18
lua/plugins/neoclip.lua
Normal file
18
lua/plugins/neoclip.lua
Normal file
@ -0,0 +1,18 @@
|
||||
return {
|
||||
'AckslD/nvim-neoclip.lua',
|
||||
dependencies = {
|
||||
{ 'kkharji/sqlite.lua', module = 'sqlite' },
|
||||
-- { 'nvim-telescope/telescope.nvim' },
|
||||
},
|
||||
config = true,
|
||||
keys = {
|
||||
{
|
||||
'[',
|
||||
function()
|
||||
require('telescope').extensions.neoclip.default({ initial_mode = 'normal' })
|
||||
end,
|
||||
desc = 'NeoClip'
|
||||
}
|
||||
},
|
||||
event = 'VeryLazy'
|
||||
}
|
34
lua/plugins/neogen.lua
Normal file
34
lua/plugins/neogen.lua
Normal file
@ -0,0 +1,34 @@
|
||||
return {
|
||||
'danymat/neogen',
|
||||
dependencies = 'nvim-treesitter/nvim-treesitter',
|
||||
opts = {
|
||||
enabled = true,
|
||||
languages = {
|
||||
cpp = {
|
||||
template = {
|
||||
annotation_convention = 'custom',
|
||||
custom = {
|
||||
{ nil, '/// file', { no_results = true, type = { 'file' } } },
|
||||
{ nil, '/// $1', { no_results = true, type = { 'func', 'file' } } },
|
||||
{ nil, '', { no_results = true, type = { 'file' } } },
|
||||
|
||||
{ nil, '/// $1', { type = { 'func' } } },
|
||||
{ 'tparam', '/// \\tparam %s $1' },
|
||||
{ 'parameters', '/// \\param %s $1' },
|
||||
{ 'return_statement', '/// \\return $1' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
'<leader>n',
|
||||
function()
|
||||
require('neogen').generate({})
|
||||
end,
|
||||
desc = 'Add comment',
|
||||
}
|
||||
},
|
||||
cmd = 'Neogen'
|
||||
}
|
40
lua/plugins/neotest.lua
Normal file
40
lua/plugins/neotest.lua
Normal file
@ -0,0 +1,40 @@
|
||||
return {
|
||||
'nvim-neotest/neotest',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
'antoinemadec/FixCursorHold.nvim',
|
||||
'nvim-neotest/neotest-python'
|
||||
},
|
||||
config = function()
|
||||
local pythonVenv = require('utils.python_venv')
|
||||
require('neotest').setup({
|
||||
adapters = {
|
||||
require('neotest-python')({
|
||||
dap = {
|
||||
justMyCode = false
|
||||
},
|
||||
args = { '--log-level', 'DEBUG' },
|
||||
runner = 'pytest',
|
||||
python = pythonVenv.getPythonEnv
|
||||
})
|
||||
}
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
'<F3>',
|
||||
function()
|
||||
require('neotest').run.run()
|
||||
end,
|
||||
desc = 'Run nearest test'
|
||||
},
|
||||
{
|
||||
'<S-F3>',
|
||||
function()
|
||||
require('neotest').run.run({ strategy = 'dap' })
|
||||
end,
|
||||
desc = 'Run nearest test'
|
||||
}
|
||||
}
|
||||
}
|
63
lua/plugins/neotree.lua
Normal file
63
lua/plugins/neotree.lua
Normal file
@ -0,0 +1,63 @@
|
||||
return {
|
||||
'nvim-neo-tree/neo-tree.nvim',
|
||||
cmd = 'Neotree',
|
||||
keys = {
|
||||
{ '\\', '<cmd>Neotree reveal<cr>', desc = 'NeoTree' },
|
||||
},
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
-- 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
'MunifTanjim/nui.nvim',
|
||||
},
|
||||
opts = {
|
||||
window = { -- see https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup for
|
||||
-- possible options. These can also be functions that return these options.
|
||||
position = 'float', -- left, right, float, current
|
||||
width = 40, -- applies to left and right positions
|
||||
popup = { -- settings that apply to float position only
|
||||
size = {
|
||||
height = '80%',
|
||||
width = '50%',
|
||||
},
|
||||
position = '50%', -- 50% means center it
|
||||
-- you can also specify border here, if you want a different setting from
|
||||
-- the global popup_border_style.
|
||||
},
|
||||
enable_git_status = false,
|
||||
-- Mappings for tree window. See `:h nep-tree-mappings` for a list of built-in commands.
|
||||
-- You can also create your own commands by providing a function instead of a string.
|
||||
mappings = {
|
||||
['<space>'] = 'toggle_node',
|
||||
['<2-LeftMouse>'] = 'open',
|
||||
['<cr>'] = 'open',
|
||||
['s'] = 'open_split',
|
||||
['v'] = 'open_vsplit',
|
||||
['C'] = 'close_node',
|
||||
['z'] = 'close_all_nodes',
|
||||
['R'] = 'refresh',
|
||||
['a'] = 'add',
|
||||
['A'] = 'add_directory',
|
||||
['d'] = 'delete',
|
||||
['r'] = 'rename',
|
||||
['y'] = 'copy_to_clipboard',
|
||||
['x'] = 'cut_to_clipboard',
|
||||
['p'] = 'paste_from_clipboard',
|
||||
['c'] = 'copy', -- takes text input for destination
|
||||
['m'] = 'move', -- takes text input for destination
|
||||
['q'] = 'close_window',
|
||||
},
|
||||
},
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
hide_dotfiles = false,
|
||||
hide_gitignored = false,
|
||||
},
|
||||
hijack_netrw_behavior = 'disabled',
|
||||
},
|
||||
source_selector = {
|
||||
winbar = true,
|
||||
statusline = false
|
||||
}
|
||||
}
|
||||
}
|
10
lua/plugins/nvim-colorizer.lua
Normal file
10
lua/plugins/nvim-colorizer.lua
Normal file
@ -0,0 +1,10 @@
|
||||
return {
|
||||
'NvChad/nvim-colorizer.lua',
|
||||
config = true,
|
||||
cmd = {
|
||||
'ColorizerAttachToBuffer',
|
||||
'ColorizerDetachFromBuffer',
|
||||
'ColorizerReloadAllBuffers',
|
||||
'ColorizerToggle'
|
||||
}
|
||||
}
|
15
lua/plugins/nvim-router.lua
Normal file
15
lua/plugins/nvim-router.lua
Normal file
@ -0,0 +1,15 @@
|
||||
return {
|
||||
'notjedi/nvim-rooter.lua',
|
||||
opts = {
|
||||
rooter_patterns = { '.git',
|
||||
'_darcs',
|
||||
'.hg',
|
||||
'.bzr',
|
||||
'.svn',
|
||||
'Makefile',
|
||||
'package.json',
|
||||
'build_nvim',
|
||||
'real_path.txt',
|
||||
'conaninfo.txt' },
|
||||
}
|
||||
}
|
10
lua/plugins/nvim-surround.lua
Normal file
10
lua/plugins/nvim-surround.lua
Normal file
@ -0,0 +1,10 @@
|
||||
return {
|
||||
'kylechui/nvim-surround',
|
||||
version = '*', -- Use for stability; omit to use `main` branch for the latest features
|
||||
event = 'VeryLazy',
|
||||
config = function()
|
||||
require('nvim-surround').setup({
|
||||
-- Configuration here, or leave empty to use defaults
|
||||
})
|
||||
end
|
||||
}
|
5
lua/plugins/nvim-ts-rainbow.lua
Normal file
5
lua/plugins/nvim-ts-rainbow.lua
Normal file
@ -0,0 +1,5 @@
|
||||
return {
|
||||
'p00f/nvim-ts-rainbow',
|
||||
dependencies = 'nvim-treesitter/nvim-treesitter',
|
||||
event = 'VeryLazy'
|
||||
}
|
4
lua/plugins/octo.lua
Normal file
4
lua/plugins/octo.lua
Normal file
@ -0,0 +1,4 @@
|
||||
return { 'pwntester/octo.nvim',
|
||||
cmd = 'Octo',
|
||||
config = true,
|
||||
}
|
31
lua/plugins/oil.lua
Normal file
31
lua/plugins/oil.lua
Normal file
@ -0,0 +1,31 @@
|
||||
return {
|
||||
'stevearc/oil.nvim',
|
||||
opts = {
|
||||
keymaps = {
|
||||
['g?'] = 'actions.show_help',
|
||||
['<CR>'] = 'actions.select',
|
||||
['<C-s>'] = 'actions.select_vsplit',
|
||||
['<C-h>'] = 'actions.select_split',
|
||||
['<C-t>'] = 'actions.select_tab',
|
||||
['<C-p>'] = 'actions.preview',
|
||||
['<C-c>'] = 'actions.close',
|
||||
['<C-l>'] = 'actions.refresh',
|
||||
['<backspace>'] = 'actions.parent',
|
||||
['_'] = 'actions.open_cwd',
|
||||
['`'] = 'actions.cd',
|
||||
['~'] = 'actions.tcd',
|
||||
['g.'] = 'actions.toggle_hidden',
|
||||
},
|
||||
},
|
||||
-- Optional dependencies
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
keys = {
|
||||
{
|
||||
'-',
|
||||
function()
|
||||
require('oil').open()
|
||||
end,
|
||||
desc = 'Open oil',
|
||||
}
|
||||
}
|
||||
}
|
19
lua/plugins/overseer.lua
Normal file
19
lua/plugins/overseer.lua
Normal file
@ -0,0 +1,19 @@
|
||||
return {
|
||||
'stevearc/overseer.nvim',
|
||||
config = function()
|
||||
require('overseer').setup({
|
||||
templates = { 'builtin', 'user.cmake.cmake' },
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
'<f4>',
|
||||
function()
|
||||
require('overseer').open()
|
||||
require('overseer').run_template()
|
||||
end,
|
||||
mode = { 'n', 'x' },
|
||||
desc = 'Start task (overseer)',
|
||||
},
|
||||
}
|
||||
}
|
22
lua/plugins/project.lua
Normal file
22
lua/plugins/project.lua
Normal file
@ -0,0 +1,22 @@
|
||||
return {
|
||||
'ahmedkhalf/project.nvim',
|
||||
config = function()
|
||||
require('project_nvim').setup(
|
||||
{
|
||||
silent_chdir = true,
|
||||
ignore_lsp = { 'null-ls', 'cmake', 'neocmake' },
|
||||
patterns = { '.git', '_darcs', '.hg', '.bzr', '.svn', 'Makefile', 'package.json', 'build_nvim', 'real_path.txt',
|
||||
'conaninfo.txt' },
|
||||
})
|
||||
end,
|
||||
enabled = false,
|
||||
keys = {
|
||||
{
|
||||
'<space>p',
|
||||
function()
|
||||
require('telescope').extensions.projects.projects()
|
||||
end,
|
||||
desc = 'Select project',
|
||||
},
|
||||
}
|
||||
}
|
203
lua/plugins/telescope.lua
Normal file
203
lua/plugins/telescope.lua
Normal file
@ -0,0 +1,203 @@
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
'molecule-man/telescope-menufacture',
|
||||
{
|
||||
'nvim-telescope/telescope-fzf-native.nvim',
|
||||
build = {
|
||||
'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -G Ninja', -- On windows add -DCMAKE_C_FLAGS="-target x86_64-w64-mingw32"
|
||||
'cmake --build build --config Release',
|
||||
'cmake --install build --prefix build'
|
||||
},
|
||||
},
|
||||
'nvim-telescope/telescope-ui-select.nvim',
|
||||
'ahmedkhalf/project.nvim',
|
||||
},
|
||||
cmd = { 'Telescope' },
|
||||
keys = {
|
||||
{
|
||||
'<leader>f',
|
||||
function()
|
||||
require('telescope').extensions.menufacture.find_files({ no_ignore = true, hidden = true })
|
||||
end,
|
||||
desc = 'Find file',
|
||||
},
|
||||
{
|
||||
'<leader>c',
|
||||
function()
|
||||
require('telescope.builtin').commands()
|
||||
end,
|
||||
desc = 'Telescope commands',
|
||||
},
|
||||
{
|
||||
'<leader>g',
|
||||
function()
|
||||
Project_files()
|
||||
end,
|
||||
desc = 'Find git files',
|
||||
},
|
||||
{
|
||||
'<leader>o',
|
||||
function()
|
||||
require('telescope.builtin').oldfiles()
|
||||
end,
|
||||
desc = 'Find old files',
|
||||
},
|
||||
{
|
||||
'<leader>b',
|
||||
function()
|
||||
require('telescope.builtin').buffers()
|
||||
end,
|
||||
desc = 'Select buffer',
|
||||
},
|
||||
{
|
||||
'<leader>q',
|
||||
function()
|
||||
require('telescope.builtin').quickfix()
|
||||
end,
|
||||
desc = 'Quickfix list with telescope',
|
||||
},
|
||||
{
|
||||
'<leader>l',
|
||||
function()
|
||||
require('telescope').extensions.menufacture.live_grep()
|
||||
end,
|
||||
desc = 'Search in project',
|
||||
},
|
||||
{
|
||||
'<leader>j',
|
||||
function()
|
||||
require('telescope.builtin').jumplist()
|
||||
end,
|
||||
desc = 'Open jumplist',
|
||||
},
|
||||
{
|
||||
'<c-f>',
|
||||
function()
|
||||
require('telescope.builtin').current_buffer_fuzzy_find()
|
||||
end,
|
||||
desc = 'Find in buffer',
|
||||
},
|
||||
{
|
||||
'<leader>d',
|
||||
function()
|
||||
require('telescope').extensions.menufacture.grep_string()
|
||||
end,
|
||||
desc = 'Find in workspace',
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local actions = require('telescope.actions')
|
||||
|
||||
local mappingTab = {
|
||||
i = {
|
||||
['<cr>'] = actions.select_tab,
|
||||
['<C-b>'] = actions.select_default,
|
||||
},
|
||||
}
|
||||
|
||||
Project_files = function()
|
||||
local opts = {} -- define here if you want to define something
|
||||
local ok = pcall(require('telescope').extensions.menufacture.git_files, opts)
|
||||
if not ok then require('telescope').extensions.menufacture.find_files(opts) end
|
||||
end
|
||||
|
||||
|
||||
local telescopeConfig = require('telescope.config')
|
||||
|
||||
-- Clone the default Telescope configuration
|
||||
local vimgrep_arguments = { unpack(telescopeConfig.values.vimgrep_arguments) }
|
||||
|
||||
-- I want to search in hidden/dot files.
|
||||
table.insert(vimgrep_arguments, '--hidden')
|
||||
-- I don't want to search in the `.git` directory.
|
||||
table.insert(vimgrep_arguments, '--glob')
|
||||
table.insert(vimgrep_arguments, '!**/.git/*')
|
||||
|
||||
require('telescope').setup({
|
||||
defaults = {
|
||||
mappings = {
|
||||
i = {
|
||||
['<cr>'] = actions.select_default + actions.center,
|
||||
['<C-l>'] = actions.send_selected_to_loclist,
|
||||
['<C-q>'] = actions.smart_send_to_qflist,
|
||||
},
|
||||
},
|
||||
-- `hidden = true` is not supported in text grep commands.
|
||||
vimgrep_arguments = vimgrep_arguments,
|
||||
},
|
||||
pickers = {
|
||||
-- Your special builtin config goes in here
|
||||
buffers = {
|
||||
sort_lastused = false,
|
||||
sort_mru = true,
|
||||
ignore_current_buffer = true,
|
||||
theme = 'ivy',
|
||||
mappings = {
|
||||
i = {
|
||||
['<c-w>'] = actions.delete_buffer,
|
||||
['<cr>'] = actions.select_default,
|
||||
},
|
||||
n = {
|
||||
['<c-w>'] = actions.delete_buffer,
|
||||
},
|
||||
},
|
||||
},
|
||||
find_files = {
|
||||
theme = 'ivy',
|
||||
previewer = false,
|
||||
-- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d.
|
||||
find_command = { 'rg', '--files', '--hidden', '--glob', '!**/.git/*' },
|
||||
},
|
||||
oldfiles = {
|
||||
theme = 'ivy',
|
||||
},
|
||||
git_files = {
|
||||
theme = 'ivy',
|
||||
previewer = false,
|
||||
},
|
||||
lsp_references = {
|
||||
show_line = false,
|
||||
include_declaration = false,
|
||||
},
|
||||
lsp_dynamic_workspace_symbols = {
|
||||
theme = 'ivy',
|
||||
fname_width = 80,
|
||||
symbol_width = 55,
|
||||
symbol_type_width = 8,
|
||||
ignore_symbols = { 'namespace' }
|
||||
},
|
||||
lsp_document_symbols = {
|
||||
theme = 'ivy',
|
||||
fname_width = 80,
|
||||
symbol_width = 85,
|
||||
symbol_type_width = 8,
|
||||
ignore_symbols = { 'namespace' }
|
||||
},
|
||||
lsp_workspace_symbols = {
|
||||
fname_width = 30,
|
||||
symbol_width = 85,
|
||||
symbol_type_width = 8,
|
||||
ignore_symbols = { 'namespace' }
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
['ui-select'] = {
|
||||
require('telescope.themes').get_dropdown {
|
||||
}
|
||||
},
|
||||
['menufacture'] = {
|
||||
mappings = {
|
||||
main_menu = { [{ 'n' }] = 'm' },
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
require('telescope').load_extension('ui-select')
|
||||
require('telescope').load_extension('fzf')
|
||||
require('telescope').load_extension('menufacture')
|
||||
end
|
||||
}
|
24
lua/plugins/toggleterm.lua
Normal file
24
lua/plugins/toggleterm.lua
Normal file
@ -0,0 +1,24 @@
|
||||
return {
|
||||
'akinsho/toggleterm.nvim',
|
||||
config = function()
|
||||
function _G.set_terminal_keymaps(term)
|
||||
local opts = { noremap = true }
|
||||
if (term.cmd ~= 'lazygit') then
|
||||
vim.api.nvim_buf_set_keymap(term.bufnr, 't', '<esc>', [[<C-\><C-n>]], opts)
|
||||
end
|
||||
vim.api.nvim_buf_set_keymap(term.bufnr, 't', 'jk', [[<C-\><C-n>]], opts)
|
||||
vim.api.nvim_buf_set_keymap(term.bufnr, 't', '<C-h>', [[<C-\><C-n><C-W>h]], opts)
|
||||
vim.api.nvim_buf_set_keymap(term.bufnr, 't', '<C-j>', [[<C-\><C-n><C-W>j]], opts)
|
||||
vim.api.nvim_buf_set_keymap(term.bufnr, 't', '<C-k>', [[<C-\><C-n><C-W>k]], opts)
|
||||
vim.api.nvim_buf_set_keymap(term.bufnr, 't', '<C-l>', [[<C-\><C-n><C-W>l]], opts)
|
||||
end
|
||||
|
||||
require('toggleterm').setup({
|
||||
on_open = set_terminal_keymaps
|
||||
})
|
||||
|
||||
local Terminal = require('toggleterm.terminal').Terminal
|
||||
|
||||
end,
|
||||
cmd = 'ToggleTerm',
|
||||
}
|
49
lua/plugins/treesitter.lua
Normal file
49
lua/plugins/treesitter.lua
Normal file
@ -0,0 +1,49 @@
|
||||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
config = function()
|
||||
require('nvim-treesitter.configs').setup({
|
||||
ensure_installed = 'all',
|
||||
highlight = {
|
||||
enable = true
|
||||
},
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
|
||||
max_file_lines = nil, -- Do not enable for files with more than n lines, int
|
||||
-- colors = {}, -- table of hex strings
|
||||
-- termcolors = {} -- table of colour name strings
|
||||
},
|
||||
indent = {
|
||||
enable = false -- maybe buggy
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
|
||||
-- Automatically jump forward to textobj, similar to targets.vim
|
||||
lookahead = true,
|
||||
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
['af'] = '@function.outer',
|
||||
['if'] = '@function.inner',
|
||||
['ac'] = '@class.outer',
|
||||
['ic'] = '@class.inner',
|
||||
},
|
||||
},
|
||||
lsp_interop = {
|
||||
enable = true,
|
||||
border = 'none',
|
||||
peek_definition_code = {
|
||||
['<leader>df'] = '@function.outer',
|
||||
['<leader>dF'] = '@class.outer',
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
local parser = require('nvim-treesitter.parsers').filetype_to_parsername
|
||||
parser.groovy = 'java' -- the someft filetype will use the python parser and queries.
|
||||
require('nvim-treesitter.install').prefer_git = true
|
||||
end
|
||||
}
|
12
lua/plugins/which-key.lua
Normal file
12
lua/plugins/which-key.lua
Normal file
@ -0,0 +1,12 @@
|
||||
return {
|
||||
'folke/which-key.nvim',
|
||||
opts = {
|
||||
plugins = {
|
||||
marks = false,
|
||||
registers = false,
|
||||
presets = {
|
||||
operators = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,16 +1,12 @@
|
||||
local utils = { }
|
||||
local utils = {}
|
||||
|
||||
local scopes = {o = vim.o, b = vim.bo, w = vim.wo}
|
||||
local scopes = { o = vim.o, b = vim.bo, w = vim.wo }
|
||||
|
||||
function utils.opt(scope, key, value)
|
||||
scopes[scope][key] = value
|
||||
if scope ~= 'o' then scopes['o'][key] = value end
|
||||
end
|
||||
|
||||
function utils.map(mode, lhs, rhs, opts)
|
||||
local options = {noremap = true}
|
||||
if opts then options = vim.tbl_extend('force', options, opts) end
|
||||
vim.api.nvim_set_keymap(mode, lhs, rhs, options)
|
||||
if scope ~= 'o' then
|
||||
scopes['o'][key] = value
|
||||
end
|
||||
end
|
||||
|
||||
return utils
|
122
lua/utils/python_venv.lua
Normal file
122
lua/utils/python_venv.lua
Normal file
@ -0,0 +1,122 @@
|
||||
local M = {}
|
||||
function M.getVenvSuffix()
|
||||
if vim.loop.os_uname().sysname == 'Linux' then
|
||||
return 'bin/python'
|
||||
elseif vim.loop.os_uname().sysname == 'Windows_NT' then
|
||||
return 'Scripts/python.exe'
|
||||
end
|
||||
end
|
||||
|
||||
function M.getVenvFromJson(jsonfile)
|
||||
if not vim.fn.filereadable(jsonfile) then
|
||||
return nil
|
||||
end
|
||||
local f = io.open(jsonfile, 'r')
|
||||
if not f then
|
||||
return nil
|
||||
end
|
||||
local data = f:read('*a')
|
||||
f:close()
|
||||
if data then
|
||||
local jdata = vim.json.decode(data)
|
||||
if jdata['venvPath'] ~= nil and jdata['venv'] ~= nil then
|
||||
return jdata['venvPath'] .. '/' .. jdata['venv']
|
||||
end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
function M.getPythonEnv()
|
||||
local venv = os.getenv('VIRTUAL_ENV')
|
||||
if venv ~= nil then
|
||||
return string.format('%s/%s', venv, M.getVenvSuffix())
|
||||
end
|
||||
local conda = os.getenv('CONDA_PREFIX')
|
||||
if conda ~= nil then
|
||||
return string.format('%s/%s', conda, 'python.exe')
|
||||
end
|
||||
|
||||
local cwd = vim.fn.getcwd()
|
||||
|
||||
local jsonVenv = M.getVenvFromJson(cwd .. '/pyrightconfig.json')
|
||||
if jsonVenv ~= nil then
|
||||
return jsonVenv .. '/' .. M.getVenvSuffix()
|
||||
end
|
||||
|
||||
if vim.fn.executable(cwd .. '/venv/' .. M.getVenvSuffix()) == 1 then
|
||||
return cwd .. '/venv/' .. M.getVenvSuffix()
|
||||
elseif vim.fn.executable(cwd .. '/.venv/' .. M.getVenvSuffix()) == 1 then
|
||||
return cwd .. '/.venv/' .. M.getVenvSuffix()
|
||||
else
|
||||
if vim.loop.os_uname().sysname == 'Linux' then
|
||||
return '/usr/bin/python'
|
||||
elseif vim.loop.os_uname().sysname == 'Windows_NT' then
|
||||
return os.getenv('SCOOP') .. '/apps/python/current/python.exe'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function M.getPythonEnvs()
|
||||
local venvs = {}
|
||||
local venv = os.getenv('VIRTUAL_ENV')
|
||||
if venv ~= nil then
|
||||
table.insert(venvs, {
|
||||
name = 'VIRTUAL_ENV',
|
||||
path = string.format('%s/%s', venv, M.getVenvSuffix())
|
||||
})
|
||||
end
|
||||
local conda = os.getenv('CONDA_PREFIX')
|
||||
if conda ~= nil then
|
||||
table.insert(venvs, {
|
||||
name = 'CONDA_PREFIX',
|
||||
path = string.format('%s/%s', conda, 'python.exe')
|
||||
})
|
||||
end
|
||||
|
||||
local cwd = vim.fn.getcwd()
|
||||
|
||||
local jsonVenv = M.getVenvFromJson(cwd .. '/pyrightconfig.json')
|
||||
if jsonVenv ~= nil then
|
||||
table.insert(venvs, {
|
||||
name = 'pyrightconfig.json',
|
||||
path = jsonVenv .. '/' .. M.getVenvSuffix()
|
||||
})
|
||||
end
|
||||
|
||||
local venvDirs = { 'venv', '.venv' }
|
||||
for _, envDir in pairs(venvDirs) do
|
||||
if vim.fn.executable(cwd .. '/' .. envDir .. '/' .. M.getVenvSuffix()) == 1 then
|
||||
table.insert(venvs, {
|
||||
name = envDir,
|
||||
path = cwd .. '/' .. envDir .. '/' .. M.getVenvSuffix()
|
||||
})
|
||||
end
|
||||
end
|
||||
if vim.loop.os_uname().sysname == 'Linux' then
|
||||
table.insert(venvs, {
|
||||
name = 'system',
|
||||
path = '/usr/bin/python'
|
||||
})
|
||||
end
|
||||
if vim.loop.os_uname().sysname == 'Windows_NT' then
|
||||
table.insert(venvs, {
|
||||
name = 'system',
|
||||
path = os.getenv('SCOOP') .. '/apps/python/current/python.exe'
|
||||
})
|
||||
end
|
||||
return venvs
|
||||
end
|
||||
|
||||
M.pick_venv = function()
|
||||
vim.ui.select(M.getPythonEnvs(), {
|
||||
prompt = 'Select python venv',
|
||||
format_item = function(item) return string.format('%s (%s)', item.name, item.path) end,
|
||||
}, function(choice)
|
||||
if not choice then
|
||||
return
|
||||
end
|
||||
print(choice.path)
|
||||
end)
|
||||
end
|
||||
|
||||
return M
|
0
my-snippets/all.json
Normal file
0
my-snippets/all.json
Normal file
12
my-snippets/cpp.json
Normal file
12
my-snippets/cpp.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"test_getter": {
|
||||
"prefix": "test_getter",
|
||||
"body": [
|
||||
"TEST(${1:TestClass}, ${2:TestFunction}",
|
||||
"{",
|
||||
"\tget${CLIPBOARD}()",
|
||||
"};"
|
||||
],
|
||||
"description": "Code snippet for testing the getter"
|
||||
}
|
||||
}
|
19
my-snippets/package.json
Normal file
19
my-snippets/package.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "my-snippets",
|
||||
"contributes": {
|
||||
"snippets": [
|
||||
{
|
||||
"language": [
|
||||
"all"
|
||||
],
|
||||
"path": "all.json"
|
||||
},
|
||||
{
|
||||
"language": [
|
||||
"cpp"
|
||||
],
|
||||
"path": "cpp.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
14
my_snippets/cpp.json
Normal file
14
my_snippets/cpp.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"TEST_F for g/setter": {
|
||||
"prefix": "TEST_F_getter",
|
||||
"body": [
|
||||
"TEST_F($1, test_${CLIPBOARD/m_(.*)/${1}/}_${2:setter}_${3:getter})",
|
||||
"{",
|
||||
" set${CLIPBOARD/m_(.)(.*)/${1:/upcase}${2}/}($4);",
|
||||
" ${5:type} result = get${CLIPBOARD/m_(.)(.*)/${1:/upcase}${2}/}();",
|
||||
" EXPECT_EQ($4, result);$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Generate TEST_F body for getter and setter functions"
|
||||
}
|
||||
}
|
14
my_snippets/package.json
Normal file
14
my_snippets/package.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "my_snippets",
|
||||
"engines": {
|
||||
"vscode": "^1.11.0"
|
||||
},
|
||||
"contributes": {
|
||||
"snippets": [
|
||||
{
|
||||
"language": "cpp",
|
||||
"path": "./cpp.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
16
pyproject.toml
Normal file
16
pyproject.toml
Normal file
@ -0,0 +1,16 @@
|
||||
# pyproject.toml
|
||||
[tool.pytest.ini_options]
|
||||
minversion = "6.0"
|
||||
addopts = "-ra -q"
|
||||
testpaths = [
|
||||
"tests",
|
||||
]
|
||||
[tool.pyright]
|
||||
venv = "venv"
|
||||
venvPath = './'
|
||||
reportOptionalMemberAccess = 'warning'
|
||||
reportGeneralTypeIssues = 'warning'
|
||||
analyzeUnannotatedFunctions = 'false'
|
||||
executionEnvironments = [
|
||||
{ root = "./" }
|
||||
]
|
4
pyrightconfig.json
Normal file
4
pyrightconfig.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"venvPath": ".",
|
||||
"venv": "venvVis"
|
||||
}
|
1
snapshots/stable.json
Normal file
1
snapshots/stable.json
Normal file
@ -0,0 +1 @@
|
||||
{"litee.nvim": {"commit": "de1a3d6"}, "nvim-dap": {"commit": "f4a3be5"}, "telescope-fzf-native.nvim": {"commit": "6a33ece"}, "packer.nvim": {"commit": "d268d2e"}, "tabout.nvim": {"commit": "be655cc"}, "nvim-lspconfig": {"commit": "b9c375c"}, "command-center.nvim": {"commit": "baaf831"}, "nvim-cmp": {"commit": "9897465"}, "clangd_extensions.nvim": {"commit": "81b56d4"}, "cmp-emoji": {"commit": "19075c3"}, "null-ls.nvim": {"commit": "a2b7bf8"}, "lualine.nvim": {"commit": "5113cdb"}, "cmp-cmdline": {"commit": "c36ca4b"}, "nvim-treesitter-textobjects": {"commit": "c8a393e"}, "cmp-nvim-lsp": {"commit": "affe808"}, "cmp_luasnip": {"commit": "a9de941"}, "friendly-snippets": {"commit": "15ecafe"}, "gitsigns.nvim": {"commit": "4883988"}, "dressing.nvim": {"commit": "af17983"}, "indent-blankline.nvim": {"commit": "4a58fe6"}, "lspkind-nvim": {"commit": "57e5b5d"}, "neo-tree.nvim": {"commit": "8613c45"}, "cmp-nvim-lsp-signature-help": {"commit": "007dd27"}, "cmp-look": {"commit": "b39c50b"}, "telescope.nvim": {"commit": "6ea1063"}, "litee-calltree.nvim": {"commit": "71f7eee"}, "lsp_signature.nvim": {"commit": "9c51678"}, "Comment.nvim": {"commit": "4086630"}, "cmp-spell": {"commit": "5602f1a"}, "yanky.nvim": {"commit": "521b94d"}, "gruvbox.nvim": {"commit": "79419f9"}, "gh.nvim": {"commit": "cdf177c"}, "aerial.nvim": {"commit": "bd6de88"}, "neovim-cmake": {"commit": "d0ffe31"}, "nvim-autopairs": {"commit": "4a95b39"}, "LuaSnip": {"commit": "295cc9e"}, "popup.nvim": {"commit": "b7404d3"}, "litee-symboltree.nvim": {"commit": "8f13d50"}, "nvim-web-devicons": {"commit": "8d2c533"}, "nvim-treesitter": {"commit": "cf6d84b"}, "nui.nvim": {"commit": "4af402d"}, "nvim-terminal": {"commit": "e058de4"}, "cmp-treesitter": {"commit": "c2886bb"}, "neogen": {"commit": "c5a0c39"}, "nvim-lsp-installer": {"commit": "12e7c06"}, "cmp-calc": {"commit": "f7efc20"}, "toggleterm.nvim": {"commit": "04174e1"}, "plenary.nvim": {"commit": "46e8bb9"}, "project.nvim": {"commit": "541115e"}, "cmp-nvim-lua": {"commit": "d276254"}, "nvim-ts-rainbow": {"commit": "837167f"}, "cmp-path": {"commit": "981baf9"}, "cmp-buffer": {"commit": "62fc67a"}}
|
1
snapshots/working.json
Normal file
1
snapshots/working.json
Normal file
@ -0,0 +1 @@
|
||||
{"litee.nvim": {"commit": "d346001"}, "nvim-dap": {"commit": "66d33b7"}, "telescope-fzf-native.nvim": {"commit": "6a33ece"}, "packer.nvim": {"commit": "afab895"}, "nvim-lspconfig": {"commit": "a78831f"}, "command-center.nvim": {"commit": "31468fd"}, "clangd_extensions.nvim": {"commit": "2390bf7"}, "nvim-dap-virtual-text": {"commit": "2971ce3"}, "null-ls.nvim": {"commit": "53622ed"}, "mason-lspconfig.nvim": {"commit": "3cbd87f"}, "lualine.nvim": {"commit": "4b5048a"}, "cmp-cmdline": {"commit": "9c0e331"}, "hlargs.nvim": {"commit": "f603d88"}, "aerial.nvim": {"commit": "1abd19b"}, "nvim-autopairs": {"commit": "ca89ab9"}, "cmp_luasnip": {"commit": "a9de941"}, "friendly-snippets": {"commit": "7339def"}, "leap.nvim": {"commit": "b9bc061"}, "gitsigns.nvim": {"commit": "1e107c9"}, "dressing.nvim": {"commit": "d886a1b"}, "indent-blankline.nvim": {"commit": "c15bbe9"}, "lspkind-nvim": {"commit": "57e5b5d"}, "neo-tree.nvim": {"commit": "a922c3a"}, "cmp-nvim-lsp-signature-help": {"commit": "57c4db7"}, "cmp-look": {"commit": "b39c50b"}, "telescope.nvim": {"commit": "4725867"}, "litee-calltree.nvim": {"commit": "7779988"}, "lsp_signature.nvim": {"commit": "4665921"}, "Comment.nvim": {"commit": "fe9bbdb"}, "cmp-spell": {"commit": "5602f1a"}, "yanky.nvim": {"commit": "d55f095"}, "mason.nvim": {"commit": "6171213"}, "gh.nvim": {"commit": "a675ce6"}, "nvim-treesitter-textobjects": {"commit": "b8df8b0"}, "neovim-cmake": {"commit": "338fd2a"}, "cmp-nvim-lsp": {"commit": "affe808"}, "LuaSnip": {"commit": "c599c56"}, "nvim-dap-ui": {"commit": "225115a"}, "popup.nvim": {"commit": "b7404d3"}, "litee-symboltree.nvim": {"commit": "426d4db"}, "nvim-web-devicons": {"commit": "2d02a56"}, "vim-repeat": {"commit": "24afe92"}, "cmp-dap": {"commit": "e21f0e5"}, "nvim-treesitter": {"commit": "501db14"}, "nui.nvim": {"commit": "9531977"}, "nvim-terminal": {"commit": "e058de4"}, "gruvbox-baby": {"commit": "a7dd15a"}, "cmp-emoji": {"commit": "19075c3"}, "cmp-treesitter": {"commit": "c2886bb"}, "neogen": {"commit": "c5a0c39"}, "project.nvim": {"commit": "090bb11"}, "cmp-calc": {"commit": "f7efc20"}, "nvim-dap-python": {"commit": "86d2636"}, "toggleterm.nvim": {"commit": "dfce846"}, "plenary.nvim": {"commit": "31807ee"}, "nvim-cmp": {"commit": "b588569"}, "telescope-dap.nvim": {"commit": "b4134ff"}, "cmp-path": {"commit": "447c87c"}, "nvim-ts-rainbow": {"commit": "d16220f"}, "cmp-nvim-lua": {"commit": "d276254"}, "cmp-buffer": {"commit": "62fc67a"}}
|
6
stylua.toml
Normal file
6
stylua.toml
Normal file
@ -0,0 +1,6 @@
|
||||
column_width = 120
|
||||
line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
quote_style = "AutoPreferSingle"
|
||||
call_parentheses = "Always"
|
Reference in New Issue
Block a user