Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dotfiles
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tim van Deurzen
dotfiles
Commits
e1fc3d3a
Commit
e1fc3d3a
authored
Jul 19, 2021
by
Tim van Deurzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update neovim config.
parent
2a418040
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
30 deletions
+77
-30
neovim/lua/lsp/init.lua
neovim/lua/lsp/init.lua
+56
-25
neovim/lua/plugins/init.lua
neovim/lua/plugins/init.lua
+19
-3
neovim/lua/treesitter/init.lua
neovim/lua/treesitter/init.lua
+2
-2
No files found.
neovim/lua/lsp/init.lua
View file @
e1fc3d3a
...
@@ -19,6 +19,10 @@ lsp_config.rust_analyzer.setup{
...
@@ -19,6 +19,10 @@ lsp_config.rust_analyzer.setup{
capabilities
=
capabilities
,
capabilities
=
capabilities
,
}
}
lsp_config
.
angularls
.
setup
{
capabilities
=
capabilities
,
}
lsp_config
.
yamlls
.
setup
{
lsp_config
.
yamlls
.
setup
{
capabilities
=
capabilities
,
capabilities
=
capabilities
,
}
}
...
@@ -59,34 +63,61 @@ lsp_config.sumneko_lua.setup{
...
@@ -59,34 +63,61 @@ lsp_config.sumneko_lua.setup{
},
},
}
}
vim
.
lsp
.
handlers
[
"textDocument/publishDiagnostics"
]
=
vim
.
lsp
.
with
(
vim
.
lsp
.
diagnostic
.
on_publish_diagnostics
,
{
local
eslint
=
{
underline
=
true
,
lintCommand
=
"eslint_d -f unix --stdin --stdin-filename ${INPUT}"
,
virtual_text
=
{
lintStdin
=
true
,
prefix
=
" » "
,
lintFormats
=
{
"%f:%l:%c: %m"
},
spacing
=
8
,
lintIgnoreExitCode
=
true
,
severity_limit
=
"Error"
,
formatCommand
=
"eslint_d --fix-to-stdout --stdin --stdin-filename=${INPUT}"
,
},
formatStdin
=
true
signs
=
true
,
}
update_in_insert
=
true
,
lsp_config
.
efm
.
setup
{
init_options
=
{
documentFormatting
=
true
},
filetypes
=
{
"javascript"
,
"typescript"
},
root_dir
=
function
(
fname
)
return
lsp_config
.
util
.
root_pattern
(
"tsconfig.json"
)(
fname
)
or
lsp_config
.
util
.
root_pattern
(
".eslintrc.js"
,
".git"
)(
fname
);
end
,
settings
=
{
rootMarkers
=
{
".eslintrc.js"
,
".git/"
},
languages
=
{
javascript
=
{
eslint
},
typescript
=
{
eslint
}
}
}
}
}
vim
.
lsp
.
handlers
[
"textDocument/publishDiagnostics"
]
=
vim
.
lsp
.
with
(
vim
.
lsp
.
diagnostic
.
on_publish_diagnostics
,
{
underline
=
true
,
virtual_text
=
{
prefix
=
" » "
,
spacing
=
8
,
severity_limit
=
"Error"
,
},
signs
=
true
,
update_in_insert
=
true
,
}
)
)
do
do
local
default_handler
=
vim
.
lsp
.
handlers
[
"textdocument/publishdiagnostics"
]
local
default_handler
=
vim
.
lsp
.
handlers
[
"textdocument/publishdiagnostics"
]
vim
.
lsp
.
handlers
[
"textdocument/publishdiagnostics"
]
=
function
(
err
,
method
,
result
,
client_id
,
bufnr
,
config
)
vim
.
lsp
.
handlers
[
"textdocument/publishdiagnostics"
]
=
function
(
err
,
method
,
result
,
client_id
,
bufnr
,
config
)
default_handler
(
err
,
method
,
result
,
client_id
,
bufnr
,
config
)
default_handler
(
err
,
method
,
result
,
client_id
,
bufnr
,
config
)
local
diagnostics
=
vim
.
lsp
.
diagnostic
.
get_all
()
local
diagnostics
=
vim
.
lsp
.
diagnostic
.
get_all
()
local
qflist
=
{}
local
qflist
=
{}
for
bufnr_
,
diagnostic
in
pairs
(
diagnostics
)
do
for
bufnr_
,
diagnostic
in
pairs
(
diagnostics
)
do
for
_
,
d
in
ipairs
(
diagnostic
)
do
for
_
,
d
in
ipairs
(
diagnostic
)
do
d
.
bufnr
=
bufnr_
d
.
bufnr
=
bufnr_
d
.
lnum
=
d
.
range
.
start
.
line
+
1
d
.
lnum
=
d
.
range
.
start
.
line
+
1
d
.
col
=
d
.
range
.
start
.
character
+
1
d
.
col
=
d
.
range
.
start
.
character
+
1
d
.
text
=
d
.
message
d
.
text
=
d
.
message
table.insert
(
qflist
,
d
)
table.insert
(
qflist
,
d
)
end
end
end
vim
.
lsp
.
util
.
set_qflist
(
qflist
)
end
end
vim
.
lsp
.
util
.
set_qflist
(
qflist
)
end
end
end
neovim/lua/plugins/init.lua
View file @
e1fc3d3a
...
@@ -204,10 +204,24 @@ return require('packer').startup(function()
...
@@ -204,10 +204,24 @@ return require('packer').startup(function()
config
=
function
()
config
=
function
()
require
(
'lsp_signature'
).
on_attach
({
require
(
'lsp_signature'
).
on_attach
({
bind
=
true
,
bind
=
true
,
-- This is mandatory, otherwise border config won't get registered.
-- If you want to hook lspsaga or other signature handler, pls set to false
doc_lines
=
2
,
-- will show two lines of comment/doc(if there are more than two lines in doc, will be truncated);
-- set to 0 if you do not want any API comments be shown
-- This setting only take effect in insert mode, it does not affect signature help in normal
-- mode
hint_enable
=
true
,
-- virtual hint enable
hint_prefix
=
"🐼 "
,
-- Panda for parameter
hint_scheme
=
"String"
,
use_lspsaga
=
false
,
-- set to true if you want to use lspsaga popup
handler_opts
=
{
handler_opts
=
{
border
=
"single"
border
=
"shadow"
-- double, single, shadow, none
}
},
decorator
=
{
"`"
,
"`"
}
-- decoractor can be `decorator = {"***", "***"}` `decorator = {"**", "**"}` `decorator = {"**_", "_**"}`
-- `decorator = {"*", "*"} see markdown help for more details
-- <u></u> ~ ~ does not supported by nvim
})
})
end
end
}
}
...
@@ -221,4 +235,6 @@ return require('packer').startup(function()
...
@@ -221,4 +235,6 @@ return require('packer').startup(function()
require
(
'gitsigns'
).
setup
()
require
(
'gitsigns'
).
setup
()
end
end
}
}
use
'tomlion/vim-solidity'
end
)
end
)
neovim/lua/treesitter/init.lua
View file @
e1fc3d3a
...
@@ -18,8 +18,8 @@ ts_configs.setup {
...
@@ -18,8 +18,8 @@ ts_configs.setup {
},
},
refactor
=
{
refactor
=
{
smart_rename
=
{
enable
=
true
,
keymaps
=
{
smart_rename
=
"grr"
}},
smart_rename
=
{
enable
=
true
,
keymaps
=
{
smart_rename
=
"grr"
}},
highlight_definitions
=
{
enable
=
true
}
highlight_definitions
=
{
enable
=
true
}
,
-- highlight_current_scope = { enable = tru
e }
highlight_current_scope
=
{
enable
=
fals
e
}
},
},
textobjects
=
{
textobjects
=
{
select
=
{
select
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment