diff --git a/dot_config/nvim/lua/configs/packages/lsp.lua b/dot_config/nvim/lua/configs/packages/lsp.lua index 3a064a1..5df951b 100644 --- a/dot_config/nvim/lua/configs/packages/lsp.lua +++ b/dot_config/nvim/lua/configs/packages/lsp.lua @@ -80,7 +80,7 @@ local server_configs = function() schemas = vim.tbl_extend('force', require('schemastore').yaml.schemas(), { - kubernetes = {'k8s/*.yaml', 'k8s/*/*.yaml', 'kubernetes/*.yaml', }, + kubernetes = {'k8s/*.yaml', '**/k8s/**/*.yaml', 'kubernetes/*.yaml', }, }), }, }, diff --git a/dot_config/nvim/lua/configs/packages/neotree.lua b/dot_config/nvim/lua/configs/packages/neotree.lua index 5c45ea4..bcf5890 100644 --- a/dot_config/nvim/lua/configs/packages/neotree.lua +++ b/dot_config/nvim/lua/configs/packages/neotree.lua @@ -182,7 +182,7 @@ function M.config() filesystem = { filtered_items = { visible = true, -- when true, they will just be displayed differently than normal items - hide_dotfiles = true, + hide_dotfiles = false, hide_gitignored = true, hide_hidden = true, -- only works on Windows for hidden files/directories hide_by_name = { diff --git a/dot_config/nvim/lua/configs/packages/null-ls.lua b/dot_config/nvim/lua/configs/packages/null-ls.lua index d4c8e61..cb230d9 100644 --- a/dot_config/nvim/lua/configs/packages/null-ls.lua +++ b/dot_config/nvim/lua/configs/packages/null-ls.lua @@ -3,9 +3,20 @@ local M = { dependencies = { 'nvim-lua/plenary.nvim' }, } +local ensure = { + 'hadolint', +} + function M.config() local nls = require 'null-ls' + for _, pkg in pairs(ensure) do + local p = require('mason-registry').get_package(pkg) + if not p:is_installed() then + p:install() + end + end + nls.setup({ debug = false, temp_dir = vim.env.XDG_RUNTIME_DIR or '/tmp', @@ -16,16 +27,13 @@ function M.config() -- nls.builtins.formatting.sqlfluff.with({ -- extra_args = { '--dialect', 'mysql' }, -- }), - -- nls.builtins.diagnostics.sqlfluff.with({ - -- extra_args = { '--dialect', 'mysql' }, - -- }), nls.builtins.diagnostics.phpstan.with({ cwd = function(params) -- falls back to root if return value is nil return params.root:match('jopixel') and not params.root:match('repo') and 'www'; end, }), - nls.builtins.formatting.phpcsfixer.with({ + nls.builtins.formatting.phpcsfixer.with({ ---{{{ extra_args = { '--rules', [[{ @@ -59,8 +67,9 @@ function M.config() } }]], }, - }), + }), -- }}} nls.builtins.diagnostics.shellcheck, + nls.builtins.diagnostics.hadolint, nls.builtins.formatting.eslint, -- nls.builtins.diagnostics.eslint, nls.builtins.code_actions.eslint, diff --git a/dot_config/nvim/lua/configs/packages/telescope.lua b/dot_config/nvim/lua/configs/packages/telescope.lua index ea869cc..73f7668 100644 --- a/dot_config/nvim/lua/configs/packages/telescope.lua +++ b/dot_config/nvim/lua/configs/packages/telescope.lua @@ -17,7 +17,7 @@ local M = { { 'Tg', [[Telescope grep_string]], desc = 'Telescope grep string' }, { 'Td', [[Telescope diagnostics]], desc = 'Telescope workspace diagnostics' }, { 'Tj', [[Telescope jumplist]], desc = 'Telescope jumplist' }, - { 'Th', [[Telescope help_tags]], desc = 'Telescope help' }, + { 'Th', [[Telescope help_tags]], desc = 'Telescope help' }, { 'TT', [[Telescope resume]], desc = 'Telescope resume' }, }, } @@ -56,6 +56,9 @@ function M.config() }, }, }, + find_files = { + hidden = true, + }, live_grep = { mappings = { i = { diff --git a/dot_config/nvim/queries/php/highlights.scm b/dot_config/nvim/queries/php/highlights.scm index 2829054..9823257 100644 --- a/dot_config/nvim/queries/php/highlights.scm +++ b/dot_config/nvim/queries/php/highlights.scm @@ -1,294 +1,6 @@ -; Variables - -(variable_name) @variable - -; Types - -[ - (primitive_type) - (cast_type) - ] @type.builtin -(named_type (name)) @type -(named_type (qualified_name)) @type -(class_declaration - name: (name) @type) -(base_clause - [(name) (qualified_name)] @type) -(enum_declaration - name: (name) @type) -(interface_declaration - name: (name) @type) -(namespace_use_clause - [(name) (qualified_name)] @type) -(namespace_aliasing_clause (name)) @type.definition -(class_interface_clause - [(name) (qualified_name)] @type) -(scoped_call_expression - scope: [(name) (qualified_name)] @type) -(class_constant_access_expression - (relative_scope) - (name) @constant) -(trait_declaration - name: (name) @type) -(use_declaration - (name) @type) -(relative_scope) @type - - -; Functions, methods, constructors - -(array_creation_expression "array" @function.builtin) -(list_literal "list" @function.builtin) - -(method_declaration - name: (name) @method) - -(function_call_expression - function: (qualified_name (name)) @function.call) - -(function_call_expression - (name) @function.call) - -(scoped_call_expression - name: (name) @function.call) - -(member_call_expression - name: (name) @method.call) - -(function_definition - name: (name) @function) - -(nullsafe_member_call_expression - name: (name) @method) - -(method_declaration - name: (name) @constructor - (#eq? @constructor "__construct")) -(object_creation_expression - [(name) (qualified_name)] @constructor) - -; Parameters -[ - (simple_parameter) - (variadic_parameter) -] @parameter - -(argument - (name) @parameter) - -; Member - -(property_element - (variable_name) @property) - -(member_access_expression - name: (variable_name (name)) @property) - -(member_access_expression - name: (name) @property) - -; Variables - -((name) @constant - (#vim-match? @constant "^_?[A-Z][A-Z\d_]*$")) -((name) @constant.builtin - (#vim-match? @constant.builtin "^__[A-Z][A-Z\d_]+__$")) - -(const_declaration (const_element (name) @constant)) - -((variable_name) @variable.builtin - (#eq? @variable.builtin "$this")) - -; Namespace -(namespace_definition - name: (namespace_name) @namespace) - -; Attributes -(attribute_list) @attribute - -; Conditions ( ? : ) -(conditional_expression) @conditional -; Basic tokens - -[ - (string) - (encapsed_string) - (heredoc_body) - (nowdoc_body) - (shell_command_expression) ; backtick operator: `ls -la` - ] @string @spell -(escape_sequence) @string.escape - -(boolean) @boolean -(null) @constant.builtin -(integer) @number -(float) @float -(comment) @comment @spell - -(named_label_statement) @label -; Keywords - -[ - "and" - "as" - "instanceof" - "or" - "xor" -] @keyword.operator - -[ - "fn" - "function" -] @keyword.function +;; extends [ "$" - "break" - "class" - "clone" - "declare" - "default" - "echo" - "enddeclare" - "enum" - "extends" - "global" - "goto" - "implements" - "insteadof" - "interface" - "namespace" - "new" - "trait" - "unset" ] @keyword -[ - "abstract" - "const" - "final" - "private" - "protected" - "public" - "readonly" - "static" -] @type.qualifier - -[ - "return" - "yield" -] @keyword.return - -[ - "case" - "else" - "elseif" - "endif" - "endswitch" - "if" - "switch" - "match" - "??" - ] @conditional - -[ - "continue" - "do" - "endfor" - "endforeach" - "endwhile" - "for" - "foreach" - "while" - ] @repeat - -[ - "catch" - "finally" - "throw" - "try" - ] @exception - -[ - "include_once" - "include" - "require_once" - "require" - "use" - ] @include - -[ - "," - ";" - ] @punctuation.delimiter - -[ - (php_tag) - "?>" - "(" - ")" - "[" - "]" - "{" - "}" - "#[" - ] @punctuation.bracket - -[ - "=" - - "." - "-" - "*" - "/" - "+" - "%" - "**" - - "~" - "|" - "^" - "&" - "<<" - ">>" - - "->" - "?->" - - "=>" - - "<" - "<=" - ">=" - ">" - "<>" - "==" - "!=" - "===" - "!==" - - "!" - "&&" - "||" - - ".=" - "-=" - "+=" - "*=" - "/=" - "%=" - "**=" - "&=" - "|=" - "^=" - "<<=" - ">>=" - "??=" - "--" - "++" - - "@" - "::" -] @operator - -(ERROR) @error diff --git a/dot_config/nvim/queries/php/injections.scm b/dot_config/nvim/queries/php/injections.scm deleted file mode 100644 index f4de34c..0000000 --- a/dot_config/nvim/queries/php/injections.scm +++ /dev/null @@ -1,11 +0,0 @@ -;; extends - -(heredoc - (heredoc_start) @_start - (heredoc_body) @sql - (#lua-match? @_start SQL)) - -(heredoc - (heredoc_start) @_start - (heredoc_body) @html - (#lua-match? @_start HTML))