diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-07-08 20:17:26 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-07-08 20:17:26 +0200 |
commit | 88616bde7c7b5b25f505997aa2171245f7341453 (patch) | |
tree | 7232fff70899952e2f91cb8b5d39c496840105db /.config/nvim/lua | |
parent | 8c0ace95e67f76b900cacd8daa38faa1444cb3b9 (diff) |
Updates to lang stuff
Diffstat (limited to '.config/nvim/lua')
-rw-r--r-- | .config/nvim/lua/cfg/utils/init.lua | 10 | ||||
-rw-r--r-- | .config/nvim/lua/default-config.lua | 113 |
2 files changed, 77 insertions, 46 deletions
diff --git a/.config/nvim/lua/cfg/utils/init.lua b/.config/nvim/lua/cfg/utils/init.lua index 2fe3331..4c5dfd2 100644 --- a/.config/nvim/lua/cfg/utils/init.lua +++ b/.config/nvim/lua/cfg/utils/init.lua @@ -8,6 +8,16 @@ function utils.reload_config() vim.cmd ":PackerInstall" end +function utils.check_lsp_client_active(name) + local clients = vim.lsp.get_active_clients() + for _, client in pairs(clients) do + if client.name == name then + return true + end + end + return false +end + function utils.define_augroups(definitions) -- {{{1 -- Create autocommand groups based on the passed definitions -- diff --git a/.config/nvim/lua/default-config.lua b/.config/nvim/lua/default-config.lua index 2f5a674..1121f28 100644 --- a/.config/nvim/lua/default-config.lua +++ b/.config/nvim/lua/default-config.lua @@ -101,23 +101,40 @@ O = { }, lang = { - python = { - linter = "", - isort = false, + cmake = {}, + clang = { diagnostics = { virtual_text = { spacing = 0, prefix = "" }, signs = true, underline = true, }, - analysis = { - type_checking = "basic", - auto_search_paths = true, - use_library_code_types = true, - }, + cross_file_rename = true, + header_insertion = "never", + }, + css = { + virtual_text = true, }, dart = { sdk_path = "/usr/lib/dart/bin/snapshots/analysis_server.dart.snapshot", }, + docker = {}, + efm = {}, + elm = {}, + emmet = { active = true }, + elixir = {}, + graphql = {}, + go = {}, + html = {}, + java = {}, + json = { + diagnostics = { + virtual_text = { spacing = 0, prefix = "" }, + signs = true, + underline = true, + }, + }, + kotlin = {}, + latex = {}, lua = { diagnostics = { virtual_text = { spacing = 0, prefix = "" }, @@ -125,18 +142,42 @@ O = { underline = true, }, }, - sh = { - -- @usage can be 'shellcheck' + php = { + format = { + format = { + default = "psr12", + }, + }, + environment = { + php_version = "7.4", + }, + diagnostics = { + virtual_text = { spacing = 0, prefix = "" }, + signs = true, + underline = true, + }, + filetypes = { "php", "phtml" }, + }, + python = { linter = "", - -- @usage can be 'shfmt' + isort = false, diagnostics = { virtual_text = { spacing = 0, prefix = "" }, signs = true, underline = true, }, + analysis = { + type_checking = "basic", + auto_search_paths = true, + use_library_code_types = true, + }, }, - tsserver = { - -- @usage can be 'eslint' + rust = { + rust_tools = { + active = false, + parameter_hints_prefix = "<-", + other_hints_prefix = "=>", -- prefix for all the other hints (type, chaining) + }, linter = "", diagnostics = { virtual_text = { spacing = 0, prefix = "" }, @@ -144,14 +185,19 @@ O = { underline = true, }, }, - json = { + sh = { + -- @usage can be 'shellcheck' + linter = "", + -- @usage can be 'shfmt' diagnostics = { virtual_text = { spacing = 0, prefix = "" }, signs = true, underline = true, }, }, + svelte = {}, tailwindcss = { + active = false, filetypes = { "html", "css", @@ -162,24 +208,9 @@ O = { "typescriptreact", }, }, - clang = { - diagnostics = { - virtual_text = { spacing = 0, prefix = "" }, - signs = true, - underline = true, - }, - cross_file_rename = true, - header_insertion = "never", - }, - go = {}, - elixir = {}, - vim = {}, - yaml = {}, terraform = {}, - rust = { - rust_tools = { - active = false, - }, + tsserver = { + -- @usage can be 'eslint' linter = "", diagnostics = { virtual_text = { spacing = 0, prefix = "" }, @@ -187,24 +218,14 @@ O = { underline = true, }, }, - latex = {}, - kotlin = {}, - html = {}, - elm = {}, - emmet = { active = true }, - graphql = {}, - efm = {}, - docker = {}, - cmake = {}, - css = { - virtual_text = true, - }, + vim = {}, + yaml = {}, }, dashboard = { custom_header = { - ' ##############..... ############## ', + ' ##############..... ############## ', ' ##############......############## ', ' ##########..........########## ', ' ##########........########## ', @@ -219,9 +240,9 @@ O = { ' ############...JJ...JJ..JJ JJ ', ' ##########....JJ...JJ..JJ JJ ', ' ########......JJJ..JJJ JJJ JJJ ', - ' ###### ......... ', + ' ###### ......... ', ' ..... ', - ' . ', + ' . ', }, }, } |