nvim
This commit is contained in:
parent
6f9f76c2d6
commit
b3b273ad45
4 changed files with 20 additions and 32 deletions
|
@ -46,8 +46,8 @@ function M.setup()
|
||||||
|
|
||||||
vim.o.statusline =
|
vim.o.statusline =
|
||||||
'%{fnamemodify(getcwd(),":t")} ' -- basename of cwd
|
'%{fnamemodify(getcwd(),":t")} ' -- basename of cwd
|
||||||
.. '%{get(b:,"gitsigns_head","")}' -- branch
|
.. '%(%{get(b:,"gitsigns_head","")} %)' -- branch
|
||||||
.. '%<%f [%M%R%W]' -- filename and modification flags
|
.. '%<%f%( [%M%R%W]%)' -- filename and modification flags
|
||||||
.. '%=' -- rest is right
|
.. '%=' -- rest is right
|
||||||
.. '%y ' -- filetype
|
.. '%y ' -- filetype
|
||||||
.. '%-7.(%3.l:%-3.(%c%V%)%) %P' -- ruler
|
.. '%-7.(%3.l:%-3.(%c%V%)%) %P' -- ruler
|
||||||
|
|
|
@ -7,6 +7,7 @@ local M = {
|
||||||
{ 'j-hui/fidget.nvim', config = true },
|
{ 'j-hui/fidget.nvim', config = true },
|
||||||
{ 'ray-x/lsp_signature.nvim', opts = { hint_prefix = '⥊ ', floating_window = false, hint_scheme = 'Identifier' } },
|
{ 'ray-x/lsp_signature.nvim', opts = { hint_prefix = '⥊ ', floating_window = false, hint_scheme = 'Identifier' } },
|
||||||
'hrsh7th/nvim-cmp',
|
'hrsh7th/nvim-cmp',
|
||||||
|
'Hoffs/omnisharp-extended-lsp.nvim',
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ '<Space>li', '<Cmd>LspInfo<CR>', desc = 'Lsp info' },
|
{ '<Space>li', '<Cmd>LspInfo<CR>', desc = 'Lsp info' },
|
||||||
|
@ -113,42 +114,17 @@ function M.config()
|
||||||
cssls = {},
|
cssls = {},
|
||||||
html = {},
|
html = {},
|
||||||
omnisharp = { -- {{{
|
omnisharp = { -- {{{
|
||||||
|
handlers = {
|
||||||
|
['textDocument/definition'] = require('omnisharp_extended').handler,
|
||||||
|
},
|
||||||
cmd = { '/usr/bin/omnisharp' },
|
cmd = { '/usr/bin/omnisharp' },
|
||||||
-- Enables support for reading code style, naming convention and analyzer
|
|
||||||
-- settings from .editorconfig.
|
|
||||||
enable_editorconfig_support = true,
|
enable_editorconfig_support = true,
|
||||||
|
|
||||||
-- If true, MSBuild project system will only load projects for files that
|
|
||||||
-- were opened in the editor. This setting is useful for big C# codebases
|
|
||||||
-- and allows for faster initialization of code navigation features only
|
|
||||||
-- for projects that are relevant to code that is being edited. With this
|
|
||||||
-- setting enabled OmniSharp may load fewer projects and may thus display
|
|
||||||
-- incomplete reference lists for symbols.
|
|
||||||
enable_ms_build_load_projects_on_demand = false,
|
enable_ms_build_load_projects_on_demand = false,
|
||||||
|
|
||||||
-- Enables support for roslyn analyzers, code fixes and rulesets.
|
|
||||||
enable_roslyn_analyzers = true,
|
enable_roslyn_analyzers = true,
|
||||||
|
|
||||||
-- Specifies whether 'using' directives should be grouped and sorted during
|
|
||||||
-- document formatting.
|
|
||||||
organize_imports_on_format = true,
|
organize_imports_on_format = true,
|
||||||
|
|
||||||
-- Enables support for showing unimported types and unimported extension
|
|
||||||
-- methods in completion lists. When committed, the appropriate using
|
|
||||||
-- directive will be added at the top of the current file. This option can
|
|
||||||
-- have a negative impact on initial completion responsiveness,
|
|
||||||
-- particularly for the first few completion sessions after opening a
|
|
||||||
-- solution.
|
|
||||||
enable_import_completion = true,
|
enable_import_completion = true,
|
||||||
|
|
||||||
-- Specifies whether to include preview versions of the .NET SDK when
|
|
||||||
-- determining which version to use for project loading.
|
|
||||||
sdk_include_prereleases = true,
|
sdk_include_prereleases = true,
|
||||||
|
|
||||||
-- Only run analyzers against open files when 'enableRoslynAnalyzers' is
|
|
||||||
-- true
|
|
||||||
analyze_open_documents_only = true,
|
analyze_open_documents_only = true,
|
||||||
|
|
||||||
}, -- }}}
|
}, -- }}}
|
||||||
sumneko_lua = { -- {{{
|
sumneko_lua = { -- {{{
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -163,6 +139,15 @@ function M.config()
|
||||||
},
|
},
|
||||||
}, -- }}}
|
}, -- }}}
|
||||||
phpactor = { -- {{{
|
phpactor = { -- {{{
|
||||||
|
handlers = {
|
||||||
|
['textDocument/publishDiagnostics'] = vim.lsp.with(
|
||||||
|
vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||||
|
virtual_text = {
|
||||||
|
severity = vim.diagnostic.severity.ERROR,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
),
|
||||||
|
},
|
||||||
root_dir = function(startpath)
|
root_dir = function(startpath)
|
||||||
local u = require('lspconfig.util')
|
local u = require('lspconfig.util')
|
||||||
return u.search_ancestors(startpath, function(path)
|
return u.search_ancestors(startpath, function(path)
|
||||||
|
|
|
@ -38,7 +38,10 @@ return {
|
||||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||||
lazy = true,
|
lazy = true,
|
||||||
cmd = { 'Trouble', 'TroubleToggle' },
|
cmd = { 'Trouble', 'TroubleToggle' },
|
||||||
keys = { { '<Space>t', ':TroubleToggle<CR>', desc = 'Trouble' } },
|
keys = {
|
||||||
|
{ '<Leader>tt', '<Cmd>TroubleToggle<CR>', desc = 'Trouble toggle' },
|
||||||
|
{ '<Leader>td', '<Cmd>Trouble document_diagnostics<CR>', desc = 'Trouble toggle' }
|
||||||
|
},
|
||||||
config = {
|
config = {
|
||||||
mode = 'document_diagnostics'
|
mode = 'document_diagnostics'
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ function M.config()
|
||||||
sources = {
|
sources = {
|
||||||
nls.builtins.formatting.xmllint,
|
nls.builtins.formatting.xmllint,
|
||||||
nls.builtins.formatting.jq,
|
nls.builtins.formatting.jq,
|
||||||
nls.builtins.formatting.clang_format,
|
-- nls.builtins.formatting.clang_format,
|
||||||
nls.builtins.diagnostics.sqlfluff,
|
nls.builtins.diagnostics.sqlfluff,
|
||||||
nls.builtins.diagnostics.phpstan.with({
|
nls.builtins.diagnostics.phpstan.with({
|
||||||
cwd = function(params)
|
cwd = function(params)
|
||||||
|
|
Loading…
Add table
Reference in a new issue