diff --git a/init.lua b/init.lua index f151cb4..041aee1 100644 --- a/init.lua +++ b/init.lua @@ -378,6 +378,13 @@ local servers = { }, lua_ls = { Lua = { + runtime = { + version = 'LuaJIT', + }, + diagnostics = { + globals = { 'vim' }, + }, + format = { enable = false }, workspace = { checkThirdParty = false }, telemetry = { enable = false }, }, diff --git a/lua/custom/plugins/norg.lua b/lua/custom/plugins/norg.lua index 7ee1c4d..1f66536 100644 --- a/lua/custom/plugins/norg.lua +++ b/lua/custom/plugins/norg.lua @@ -4,8 +4,8 @@ return { opts = { load = { ['core.defaults'] = {}, -- Loads default behaviour - ['core.norg.concealer'] = {}, -- Adds pretty icons to your documents - ['core.norg.dirman'] = { -- Manages Neorg workspaces + ['core.concealer'] = {}, -- Adds pretty icons to your documents + ['core.dirman'] = { -- Manages Neorg workspaces config = { workspaces = { notes = '~/notes', diff --git a/lua/custom/plugins/nullls.lua b/lua/custom/plugins/nullls.lua index f69b6a4..044dac4 100644 --- a/lua/custom/plugins/nullls.lua +++ b/lua/custom/plugins/nullls.lua @@ -1,59 +1,63 @@ return { - "jay-babu/mason-null-ls.nvim", + 'jay-babu/mason-null-ls.nvim', lazy = false, -- event = { "BufReadPre", "BufNewFile" }, dependencies = { - "williamboman/mason.nvim", - "jose-elias-alvarez/null-ls.nvim", + 'williamboman/mason.nvim', + 'jose-elias-alvarez/null-ls.nvim', }, - config = function () - require("mason").setup() - require("mason-null-ls").setup({ + config = function() + require('mason').setup() + require('mason-null-ls').setup { ensure_installed = { 'stylua', 'jq', 'eslint_d' }, automatic_setup = false, automatic_installation = false, - }) - local nls = require('null-ls') + } + local nls = require 'null-ls' local diagnostics = nls.builtins.diagnostics local formatting = nls.builtins.formatting local code_actions = nls.builtins.code_actions - local h = require("null-ls.helpers") - local u = require("null-ls.utils") + local h = require 'null-ls.helpers' + local u = require 'null-ls.utils' local function eslint_d_cwd(params) return u.root_pattern( -- https://eslint.org/docs/user-guide/configuring/configuration-files#configuration-file-formats - ".eslintrc", - ".eslintrc.js", - ".eslintrc.cjs", - ".eslintrc.yaml", - ".eslintrc.yml", - ".eslintrc.json" + '.eslintrc', + '.eslintrc.js', + '.eslintrc.cjs', + '.eslintrc.yaml', + '.eslintrc.yml', + '.eslintrc.json' -- do not respect package.json -- "package.json", )(params.bufname) end - require("null-ls").setup({ + require('null-ls').setup { debug = true, sources = { -- Anything not supported by mason. - diagnostics.eslint_d.with({ + -- lua + formatting.stylua, + -- eslint + diagnostics.eslint_d.with { cwd = h.cache.by_bufnr(eslint_d_cwd), -- not sure how to scope this only to bcr's locales - extra_filetypes = { "json" }, - }), - formatting.eslint_d.with({ + extra_filetypes = { 'json' }, + }, + formatting.eslint_d.with { cwd = h.cache.by_bufnr(eslint_d_cwd), -- not sure how to scope this only to bcr's locales - extra_filetypes = { "json" }, - }), - code_actions.eslint_d.with({ + extra_filetypes = { 'json' }, + }, + code_actions.eslint_d.with { cwd = h.cache.by_bufnr(eslint_d_cwd), -- not sure how to scope this only to bcr's locales - extra_filetypes = { "json" }, - }), + extra_filetypes = { 'json' }, + }, + -- refactoring code_actions.refactoring, }, - }) + } end, } diff --git a/lua/custom/plugins/utils.lua b/lua/custom/plugins/utils.lua index a72fc46..10d272e 100644 --- a/lua/custom/plugins/utils.lua +++ b/lua/custom/plugins/utils.lua @@ -3,14 +3,14 @@ return { { 'tpope/vim-abolish', lazy = false }, { 'tpope/vim-unimpaired', lazy = false }, { - "kylechui/nvim-surround", - version = "*", - event = "VeryLazy", + 'kylechui/nvim-surround', + version = '*', + event = 'VeryLazy', config = function() - require("nvim-surround").setup({ + require('nvim-surround').setup { -- Configuration here, or leave empty to use defaults - }) - end + } + end, }, { 'rcarriga/nvim-notify',