1
0
Fork 0
This commit is contained in:
Vladimír Dudr 2023-02-04 14:07:05 +01:00
parent 6f9f76c2d6
commit b3b273ad45
4 changed files with 20 additions and 32 deletions

View file

@ -46,8 +46,8 @@ function M.setup()
vim.o.statusline =
'%{fnamemodify(getcwd(),":t")} ' -- basename of cwd
.. '%{get(b:,"gitsigns_head","")}' -- branch
.. '%<%f [%M%R%W]' -- filename and modification flags
.. '%(%{get(b:,"gitsigns_head","")} %)' -- branch
.. '%<%f%( [%M%R%W]%)' -- filename and modification flags
.. '%=' -- rest is right
.. '%y ' -- filetype
.. '%-7.(%3.l:%-3.(%c%V%)%) %P' -- ruler

View file

@ -7,6 +7,7 @@ local M = {
{ 'j-hui/fidget.nvim', config = true },
{ 'ray-x/lsp_signature.nvim', opts = { hint_prefix = '', floating_window = false, hint_scheme = 'Identifier' } },
'hrsh7th/nvim-cmp',
'Hoffs/omnisharp-extended-lsp.nvim',
},
keys = {
{ '<Space>li', '<Cmd>LspInfo<CR>', desc = 'Lsp info' },
@ -113,42 +114,17 @@ function M.config()
cssls = {},
html = {},
omnisharp = { -- {{{
handlers = {
['textDocument/definition'] = require('omnisharp_extended').handler,
},
cmd = { '/usr/bin/omnisharp' },
-- Enables support for reading code style, naming convention and analyzer
-- settings from .editorconfig.
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,
-- Enables support for roslyn analyzers, code fixes and rulesets.
enable_roslyn_analyzers = true,
-- Specifies whether 'using' directives should be grouped and sorted during
-- document formatting.
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,
-- Specifies whether to include preview versions of the .NET SDK when
-- determining which version to use for project loading.
sdk_include_prereleases = true,
-- Only run analyzers against open files when 'enableRoslynAnalyzers' is
-- true
analyze_open_documents_only = true,
}, -- }}}
sumneko_lua = { -- {{{
settings = {
@ -163,6 +139,15 @@ function M.config()
},
}, -- }}}
phpactor = { -- {{{
handlers = {
['textDocument/publishDiagnostics'] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
virtual_text = {
severity = vim.diagnostic.severity.ERROR,
}
}
),
},
root_dir = function(startpath)
local u = require('lspconfig.util')
return u.search_ancestors(startpath, function(path)

View file

@ -38,7 +38,10 @@ return {
dependencies = { 'nvim-tree/nvim-web-devicons' },
lazy = true,
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 = {
mode = 'document_diagnostics'
}

View file

@ -12,7 +12,7 @@ function M.config()
sources = {
nls.builtins.formatting.xmllint,
nls.builtins.formatting.jq,
nls.builtins.formatting.clang_format,
-- nls.builtins.formatting.clang_format,
nls.builtins.diagnostics.sqlfluff,
nls.builtins.diagnostics.phpstan.with({
cwd = function(params)