diff --git a/cmd/source_priority.lua b/cmd/source_priority.lua index 7da03f7..9af9465 100644 --- a/cmd/source_priority.lua +++ b/cmd/source_priority.lua @@ -2,7 +2,7 @@ return { source_priority = { nvim_lsp = 1000, luasnip = 750, - buffer = 500, - path = 250, + path = 500, + buffer = 250, }, } diff --git a/options.lua b/options.lua index d5aaaf0..efe8519 100644 --- a/options.lua +++ b/options.lua @@ -17,7 +17,7 @@ return { autoformat_enabled = true, -- enable or disable auto formatting at start (lsp.formatting.format_on_save must be enabled) icons_enabled = true, -- disable icons in the UI (disable if no nerd font is available, requires :PackerSync after changing) ui_notifications_enabled = true, -- disable notifications when toggling UI elements - heirline_bufferline = false, -- enable new heirline based bufferline (requires :PackerSync after changing) + heirline_bufferline = true, -- enable new heirline based bufferline (requires :PackerSync after changing) vim_markdown_folding_disabled = 1, vim_markdown_conceal = 1, diff --git a/plugins/dataview-js.lua b/plugins/dataview-js.lua new file mode 100644 index 0000000..193a2ad --- /dev/null +++ b/plugins/dataview-js.lua @@ -0,0 +1,5 @@ +--return { +-- "kjuulh/dataviewjs.nvim", +-- after = "nvim-treesitter", +-- config = function() require("dataviewjs").init {} end, +--} diff --git a/plugins/init.lua b/plugins/init.lua deleted file mode 100644 index 5208fac..0000000 --- a/plugins/init.lua +++ /dev/null @@ -1,119 +0,0 @@ -return { - { - "nvim-telescope/telescope-file-browser.nvim", - after = "telescope.nvim", - config = function() require("telescope").load_extension "file_browser" end, - }, - --{ - -- "ahmedkhalf/project.nvim", - -- after = "telescope.nvim", - -- config = function() - -- require("project_nvim").setup { - -- -- Manual mode doesn't automatically change your root directory, so you have - -- -- the option to manually do so using `:ProjectRoot` command. - -- manual_mode = false, - - -- -- Methods of detecting the root directory. **"lsp"** uses the native neovim - -- -- lsp, while **"pattern"** uses vim-rooter like glob pattern matching. Here - -- -- order matters: if one is not detected, the other is used as fallback. You - -- -- can also delete or rearangne the detection methods. - -- detection_methods = { "lsp", "pattern" }, - - -- -- All the patterns used to detect root dir, when **"pattern"** is in - -- -- detection_methods - -- patterns = { ".git", "Makefile", "package.json" }, - - -- -- Table of lsp clients to ignore by name - -- -- eg: { "efm", ... } - -- ignore_lsp = {}, - - -- -- Don't calculate root dir on specific directories - -- -- Ex: { "~/.cargo/*", ... } - -- exclude_dirs = {}, - - -- -- Show hidden files in telescope - -- show_hidden = false, - - -- -- When set to false, you will get a message when project.nvim changes your - -- -- directory. - -- silent_chdir = true, - - -- -- What scope to change the directory, valid options are - -- -- * global (default) - -- -- * tab - -- -- * win - -- scope_chdir = "global", - - -- -- Path where project.nvim will store the project history for use in - -- -- telescope - -- datapath = vim.fn.stdpath "data", - -- } - -- require("telescope").load_extension "projects" - -- end, - --}, - { - after = "telescope.nvim", - "pwntester/octo.nvim", - config = function() require("octo").setup() end, - }, - --{ - -- "~/git/git.front.kjuulh.io/kjuulh/github-presense", - -- config = function() require("github_presence").setup {} end, - --}, - { - "~/git/git.front.kjuulh.io/kjuulh/ranger.nvim", - config = function() require("ranger").setup {} end, - }, - { - "~/git/git.front.kjuulh.io/kjuulh/dataviewjs.nvim", - after = "nvim-treesitter", - config = function() require("dataviewjs").init {} end, - }, - { - "iamcco/markdown-preview.nvim", - run = function() vim.fn["mkdp#util#install"]() end, - }, - { - "godlygeek/tabular", - }, - { - "elzr/vim-json", - }, - { - "plasticboy/vim-markdown", - }, - { - "folke/tokyonight.nvim", - }, - { "scalameta/nvim-metals", requires = { "nvim-lua/plenary.nvim" } }, - { - "leoluz/nvim-dap-go", - config = function() - require("dap-go").setup { - -- Additional dap configurations can be added. - -- dap_configurations accepts a list of tables where each entry - -- represents a dap configuration. For more details do: - -- :help dap-configuration - dap_configurations = { - { - -- Must be "go" or it will be ignored by the plugin - type = "go", - name = "Attach remote", - mode = "remote", - request = "attach", - }, - }, - -- delve configurations - delve = { - -- time to wait for delve to initialize the debug session. - -- default to 20 seconds - initialize_timeout_sec = 20, - -- a string that defines the port to start delve debugger. - -- default to string "${port}" which instructs nvim-dap - -- to start the process in a random available port - port = "${port}", - }, - } - end, - }, -} diff --git a/plugins/mason-lspconfig.lua b/plugins/mason-lspconfig.lua index 33e0e05..f5ac5cc 100644 --- a/plugins/mason-lspconfig.lua +++ b/plugins/mason-lspconfig.lua @@ -1,3 +1,7 @@ return { - ensure_installed = { "sumneko_lua", "rust_analyzer", "gopls", "yamlls" }, + "williamboman/mason-lspconfig.nvim", + opts = { + ensure_installed = { "sumneko_lua", "rust_analyzer", "gopls", "yamlls", "tsserver", "terraformls" }, + automatic_installation = true, + }, } diff --git a/plugins/mason-null-ls.lua b/plugins/mason-null-ls.lua index 166e198..c5434d8 100644 --- a/plugins/mason-null-ls.lua +++ b/plugins/mason-null-ls.lua @@ -1,3 +1,4 @@ return { -- overrides `require("mason-null-ls").setup(...)` - ensure_installed = { "prettier", "stylua" }, + "jay-babu/mason-null-ls.nvim", + opts = { ensure_installed = { "prettier", "stylua" } }, } diff --git a/plugins/null-ls.lua b/plugins/null-ls.lua index f56a244..98813e0 100644 --- a/plugins/null-ls.lua +++ b/plugins/null-ls.lua @@ -1,31 +1,29 @@ -return function(config) -- overrides `require("null-ls").setup(config)` - -- config variable is the default configuration table for the setup function call - local null_ls = require "null-ls" - - -- Check supported formatters and linters - -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting - -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics - config.sources = { - -- Set a formatter - null_ls.builtins.formatting.stylua, - null_ls.builtins.formatting.prettier, - null_ls.builtins.formatting.deno_fmt.with { - filetypes = { "markdown" }, - }, - null_ls.builtins.formatting.csharpier, - null_ls.builtins.diagnostics.sqlfluff.with { - extra_args = { - "--dialect", - "postgres", - "--config", - "/Users/kah/.config/sqlfluff/sqlc/config.toml", - }, -- change to your dialect - }, - null_ls.builtins.formatting.gofumpt, - null_ls.builtins.formatting.goimports, - null_ls.builtins.formatting.goimports_reviser, - null_ls.builtins.formatting.golines, - --null_ls.builtins.formatting.pg_format, - } - return config -- return final config table -end +return { + "jose-elias-alvarez/null-ls.nvim", + opts = function(_, config) + local null_ls = require "null-ls" + config.sources = { + -- Set a formatter + null_ls.builtins.formatting.stylua, + null_ls.builtins.formatting.prettier, + null_ls.builtins.formatting.deno_fmt.with { + filetypes = { "markdown" }, + }, + null_ls.builtins.formatting.csharpier, + null_ls.builtins.diagnostics.sqlfluff.with { + extra_args = { + "--dialect", + "postgres", + "--config", + "/Users/kah/.config/sqlfluff/sqlc/config.toml", + }, -- change to your dialect + }, + null_ls.builtins.formatting.gofumpt, + null_ls.builtins.formatting.goimports, + null_ls.builtins.formatting.goimports_reviser, + null_ls.builtins.formatting.golines, + --null_ls.builtins.formatting.pg_format, + } + return config -- return final config table + end, +} diff --git a/plugins/nvim-dap-go.lua b/plugins/nvim-dap-go.lua new file mode 100644 index 0000000..92f2f2e --- /dev/null +++ b/plugins/nvim-dap-go.lua @@ -0,0 +1,30 @@ +return { + "leoluz/nvim-dap-go", + config = function() + require("dap-go").setup { + -- Additional dap configurations can be added. + -- dap_configurations accepts a list of tables where each entry + -- represents a dap configuration. For more details do: + -- :help dap-configuration + dap_configurations = { + { + -- Must be "go" or it will be ignored by the plugin + type = "go", + name = "Attach remote", + mode = "remote", + request = "attach", + }, + }, + -- delve configurations + delve = { + -- time to wait for delve to initialize the debug session. + -- default to 20 seconds + initialize_timeout_sec = 20, + -- a string that defines the port to start delve debugger. + -- default to string "${port}" which instructs nvim-dap + -- to start the process in a random available port + port = "${port}", + }, + } + end, +} diff --git a/plugins/nvim-telescope.lua b/plugins/nvim-telescope.lua new file mode 100644 index 0000000..09a708c --- /dev/null +++ b/plugins/nvim-telescope.lua @@ -0,0 +1,5 @@ +return { + "nvim-telescope/telescope-file-browser.nvim", + after = "telescope.nvim", + config = function() require("telescope").load_extension "file_browser" end, +} diff --git a/plugins/octo.lua b/plugins/octo.lua new file mode 100644 index 0000000..4d55c01 --- /dev/null +++ b/plugins/octo.lua @@ -0,0 +1,5 @@ +return { + after = "telescope.nvim", + "pwntester/octo.nvim", + config = function() require("octo").setup() end, +} diff --git a/plugins/ranger-nvim.lua b/plugins/ranger-nvim.lua new file mode 100644 index 0000000..c8e917b --- /dev/null +++ b/plugins/ranger-nvim.lua @@ -0,0 +1,4 @@ +return { + "kjuulh/ranger.nvim", + config = function() require("ranger").setup {} end, +} diff --git a/plugins/tabular.lua b/plugins/tabular.lua new file mode 100644 index 0000000..e60516c --- /dev/null +++ b/plugins/tabular.lua @@ -0,0 +1,3 @@ +return { + "godlygeek/tabular", +} diff --git a/plugins/tokyonight.lua b/plugins/tokyonight.lua new file mode 100644 index 0000000..679ed73 --- /dev/null +++ b/plugins/tokyonight.lua @@ -0,0 +1,3 @@ +return { + "folke/tokyonight.nvim", +} diff --git a/plugins/treesitter.lua b/plugins/treesitter.lua index e69de29..55836fa 100644 --- a/plugins/treesitter.lua +++ b/plugins/treesitter.lua @@ -0,0 +1,12 @@ +return { -- overrides `require("treesitter").setup(...)` + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "lua", + "rust", + "markdown", + "typescript", + "go", + }, + }, +} diff --git a/plugins/vim-json.lua b/plugins/vim-json.lua new file mode 100644 index 0000000..b95bbd1 --- /dev/null +++ b/plugins/vim-json.lua @@ -0,0 +1,3 @@ +return { + "elzr/vim-json", +} diff --git a/plugins/vim-markdown.lua b/plugins/vim-markdown.lua new file mode 100644 index 0000000..fd53f8c --- /dev/null +++ b/plugins/vim-markdown.lua @@ -0,0 +1,3 @@ +return { + "plasticboy/vim-markdown", +} diff --git a/updater.lua b/updater.lua index 39a93c9..7650ca7 100644 --- a/updater.lua +++ b/updater.lua @@ -1,17 +1,19 @@ return { remote = "origin", -- remote to use - channel = "stable", -- "stable" or "nightly" - version = "latest", -- "latest", tag name, or regex search like "v1.*" to only do updates before v2 (STABLE ONLY) - --branch = "main", -- branch name (NIGHTLY ONLY) - commit = nil, -- commit hash (NIGHTLY ONLY) + --channel = "stable", -- "stable" or "nightly" + channel = "nightly", -- "stable" or "nightly" + --version = "v2.11.7", -- "latest", tag name, or regex search like "v1.*" to only do updates before v2 (STABLE ONLY) + branch = "v3", -- branch name (NIGHTLY ONLY) + --commit = nil, -- commit hash (NIGHTLY ONLY) pin_plugins = nil, -- nil, true, false (nil will pin plugins on stable only) skip_prompts = false, -- skip prompts about breaking changes show_changelog = true, -- show the changelog after performing an update auto_reload = false, -- automatically reload and sync packer after a successful update auto_quit = false, -- automatically quit the current session after a successful update - -- remotes = { -- easily add new remotes to track - -- ["remote_name"] = "https://remote_url.come/repo.git", -- full remote url - -- ["remote2"] = "github_user/repo", -- GitHub user/repo shortcut, - -- ["remote3"] = "github_user", -- GitHub user assume AstroNvim fork - -- }, + remotes = { -- easily add new remotes to track + ["kjuulh/ranger.nvim"] = "https://git.front.kjuulh.io/kjuulh/ranger.nvim.git", -- full remote url + ["kjuulh/dataviewjs"] = "https://git.front.kjuulh.io/kjuulh/dataviewjs.nvim.git", -- full remote url + -- ["remote2"] = "github_user/repo", -- GitHub user/repo shortcut, + -- ["remote3"] = "github_user", -- GitHub user assume AstroNvim fork + }, } diff --git a/which_key/register.lua b/which-key/register.lua similarity index 100% rename from which_key/register.lua rename to which-key/register.lua