-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathlspsaga.nix
192 lines (182 loc) · 3.61 KB
/
lspsaga.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
{
plugins.lspsaga = {
enable = true;
beacon = {
enable = true;
};
ui = {
border = "rounded"; # One of none, single, double, rounded, solid, shadow
codeAction = "💡"; # Can be any symbol you want 💡
};
hover = {
openCmd = "!floorp"; # Choose your browser
openLink = "gx";
};
diagnostic = {
borderFollow = true;
diagnosticOnlyCurrent = false;
showCodeAction = true;
};
symbolInWinbar = {
enable = true; # Breadcrumbs
};
codeAction = {
extendGitSigns = false;
showServerName = true;
onlyInCursor = true;
numShortcut = true;
keys = {
exec = "<CR>";
quit = [
"<Esc>"
"q"
];
};
};
lightbulb = {
enable = false;
sign = false;
virtualText = true;
};
implement = {
enable = false;
};
rename = {
autoSave = false;
keys = {
exec = "<CR>";
quit = [
"<C-k>"
"<Esc>"
];
select = "x";
};
};
outline = {
autoClose = true;
autoPreview = true;
closeAfterJump = true;
layout = "normal"; # normal or float
winPosition = "right"; # left or right
keys = {
jump = "e";
quit = "q";
toggleOrJump = "o";
};
};
scrollPreview = {
scrollDown = "<C-f>";
scrollUp = "<C-b>";
};
};
keymaps = [
{
mode = "n";
key = "gd";
action = "<cmd>Lspsaga finder def<CR>";
options = {
desc = "Goto Definition";
silent = true;
};
}
{
mode = "n";
key = "gr";
action = "<cmd>Lspsaga finder ref<CR>";
options = {
desc = "Goto References";
silent = true;
};
}
# {
# mode = "n";
# key = "gD";
# action = "<cmd>Lspsaga show_line_diagnostics<CR>";
# options = {
# desc = "Goto Declaration";
# silent = true;
# };
# }
{
mode = "n";
key = "gI";
action = "<cmd>Lspsaga finder imp<CR>";
options = {
desc = "Goto Implementation";
silent = true;
};
}
{
mode = "n";
key = "gT";
action = "<cmd>Lspsaga peek_type_definition<CR>";
options = {
desc = "Type Definition";
silent = true;
};
}
{
mode = "n";
key = "K";
action = "<cmd>Lspsaga hover_doc<CR>";
options = {
desc = "Hover";
silent = true;
};
}
{
mode = "n";
key = "<leader>cw";
action = "<cmd>Lspsaga outline<CR>";
options = {
desc = "Outline";
silent = true;
};
}
{
mode = "n";
key = "<leader>cr";
action = "<cmd>Lspsaga rename<CR>";
options = {
desc = "Rename";
silent = true;
};
}
{
mode = "n";
key = "<leader>ca";
action = "<cmd>Lspsaga code_action<CR>";
options = {
desc = "Code Action";
silent = true;
};
}
{
mode = "n";
key = "<leader>cd";
action = "<cmd>Lspsaga show_line_diagnostics<CR>";
options = {
desc = "Line Diagnostics";
silent = true;
};
}
{
mode = "n";
key = "[d";
action = "<cmd>Lspsaga diagnostic_jump_next<CR>";
options = {
desc = "Next Diagnostic";
silent = true;
};
}
{
mode = "n";
key = "]d";
action = "<cmd>Lspsaga diagnostic_jump_prev<CR>";
options = {
desc = "Previous Diagnostic";
silent = true;
};
}
];
}