From 2c01301480c4dc6c17469cc4379fe83faeb6e584 Mon Sep 17 00:00:00 2001 From: Petr Sykora Date: Mon, 10 Feb 2025 10:48:57 +0100 Subject: [PATCH 1/5] feat: changes from gnomicka --- init.lua | 26 +++++++++++++++++++++++--- load-oapi.lua | 5 +++++ 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 load-oapi.lua diff --git a/init.lua b/init.lua index ea86b792abe..7a4efb1c111 100644 --- a/init.lua +++ b/init.lua @@ -100,6 +100,7 @@ vim.g.have_nerd_font = false -- Make line numbers default vim.opt.number = true +vim.wo.relativenumber = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! -- vim.opt.relativenumber = true @@ -114,9 +115,9 @@ vim.opt.showmode = false -- Schedule the setting after `UiEnter` because it can increase startup-time. -- Remove this option if you want your OS clipboard to remain independent. -- See `:help 'clipboard'` -vim.schedule(function() - vim.opt.clipboard = 'unnamedplus' -end) +-- vim.schedule(function() +-- vim.opt.clipboard = 'unnamedplus' +-- end) -- Enable break indent vim.opt.breakindent = true @@ -230,6 +231,9 @@ vim.opt.rtp:prepend(lazypath) require('lazy').setup({ -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically + -- 'phha/zenburn.nvim', -- not great + 'tomasiser/vim-code-dark', + 'ribru17/bamboo.nvim', -- NOTE: Plugins can also be added by using a table, -- with the first argument being the link and the following @@ -256,6 +260,20 @@ require('lazy').setup({ }, }, + { + 'NeogitOrg/neogit', + dependencies = { + 'nvim-lua/plenary.nvim', -- required + 'sindrets/diffview.nvim', -- optional - Diff integration + + -- Only one of these is needed. + 'nvim-telescope/telescope.nvim', -- optional + 'ibhagwan/fzf-lua', -- optional + 'echasnovski/mini.pick', -- optional + }, + config = true, + }, + -- NOTE: Plugins can also be configured to run Lua code when they are loaded. -- -- This is often very useful to both group configuration, as well as handle @@ -617,6 +635,8 @@ require('lazy').setup({ -- But for many setups, the LSP (`ts_ls`) will work just fine -- ts_ls = {}, -- + -- kotlin_language_server = {}, + vacuum = {}, lua_ls = { -- cmd = {...}, diff --git a/load-oapi.lua b/load-oapi.lua new file mode 100644 index 00000000000..dece5b5e419 --- /dev/null +++ b/load-oapi.lua @@ -0,0 +1,5 @@ +vim.lsp.start { + cmd = { 'openapi-language-server', '-testdata', '/tmp/xyz.txt' }, + filetypes = { 'yaml.openapi', 'yaml.oa', 'yaml' }, + root_dir = vim.fn.getcwd(), +} From 503048e94d27b8b1ddf3daa26af2faa77e9bd60e Mon Sep 17 00:00:00 2001 From: Petr Sykora Date: Mon, 10 Feb 2025 18:29:53 +0100 Subject: [PATCH 2/5] feat: state from paimutan --- init.lua | 124 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 77 insertions(+), 47 deletions(-) diff --git a/init.lua b/init.lua index 3e7c7f0e084..71692c8ead6 100644 --- a/init.lua +++ b/init.lua @@ -91,7 +91,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.opt` @@ -142,6 +142,8 @@ vim.opt.timeoutlen = 300 vim.opt.splitright = true vim.opt.splitbelow = true +vim.opt.wrap = true + -- Sets how neovim will display certain whitespace characters in the editor. -- See `:help 'list'` -- and `:help 'listchars'` @@ -258,6 +260,22 @@ require('lazy').setup({ }, }, }, + { + "NeogitOrg/neogit", + dependencies = { + "nvim-lua/plenary.nvim", -- required + "sindrets/diffview.nvim", -- optional - Diff integration + + -- Only one of these is needed. + "nvim-telescope/telescope.nvim", -- optional + "ibhagwan/fzf-lua", -- optional + "echasnovski/mini.pick", -- optional + }, + integrations = { + diffview = true + }, + config = true + }, { 'NeogitOrg/neogit', @@ -634,9 +652,11 @@ require('lazy').setup({ -- - settings (table): Override the default settings passed when initializing the server. -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { - -- clangd = {}, - -- gopls = {}, - -- pyright = {}, + clangd = {}, + gopls = {}, + pyright = {}, + kotlin_language_server = {}, + phpactor = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- @@ -699,48 +719,49 @@ require('lazy').setup({ end, }, - { -- Autoformat - 'stevearc/conform.nvim', - event = { 'BufWritePre' }, - cmd = { 'ConformInfo' }, - keys = { - { - 'f', - function() - require('conform').format { async = true, lsp_format = 'fallback' } - end, - mode = '', - desc = '[F]ormat buffer', - }, - }, - opts = { - notify_on_error = false, - format_on_save = function(bufnr) - -- Disable "format_on_save lsp_fallback" for languages that don't - -- have a well standardized coding style. You can add additional - -- languages here or re-enable it for the disabled ones. - local disable_filetypes = { c = true, cpp = true } - local lsp_format_opt - if disable_filetypes[vim.bo[bufnr].filetype] then - lsp_format_opt = 'never' - else - lsp_format_opt = 'fallback' - end - return { - timeout_ms = 500, - lsp_format = lsp_format_opt, - } - end, - formatters_by_ft = { - lua = { 'stylua' }, - -- Conform can also run multiple formatters sequentially - -- python = { "isort", "black" }, - -- - -- You can use 'stop_after_first' to run the first available formatter from the list - -- javascript = { "prettierd", "prettier", stop_after_first = true }, - }, - }, - }, + -- { -- Autoformat + -- 'stevearc/confoorm.nvim', + -- event = { 'BufWritePre' }, + -- cmd = { 'ConformInfo' }, + -- keys = { + -- { + -- 'f', + -- function() + -- require('conform').format { async = true, lsp_format = 'fallback' } + -- end, + -- mode = '', + -- desc = '[F]ormat buffer', + -- }, + -- }, + -- opts = { + -- notify_on_error = false, + -- format_on_save = function(bufnr) + -- -- Disable "format_on_save lsp_fallback" for languages that don't + -- -- have a well standardized coding style. You can add additional + -- -- languages here or re-enable it for the disabled ones. + -- local disable_filetypes = { c = true, cpp = true } + -- local lsp_format_opt + -- if disable_filetypes[vim.bo[bufnr].filetype] then + -- lsp_format_opt = 'never' + -- else + -- lsp_format_opt = 'fallback' + -- end + -- return { + -- timeout_ms = 500, + -- lsp_format = lsp_format_opt, + -- } + -- end, + -- formatters_by_ft = { + -- lua = { 'stylua' }, + -- kotlin = { 'ktlint' }, + -- -- Conform can also run multiple formatters sequentially + -- -- python = { "isort", "black" }, + -- -- + -- -- You can use 'stop_after_first' to run the first available formatter from the list + -- -- javascript = { "prettierd", "prettier", stop_after_first = true }, + -- }, + -- }, + -- }, { -- Autocompletion 'hrsh7th/nvim-cmp', @@ -922,7 +943,7 @@ require('lazy').setup({ main = 'nvim-treesitter.configs', -- Sets main module to use for opts -- [[ Configure Treesitter ]] See `:help nvim-treesitter` opts = { - ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, + ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc', 'yaml', 'kotlin' }, -- Autoinstall languages that are not installed auto_install = true, highlight = { @@ -941,6 +962,9 @@ require('lazy').setup({ -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects }, + { + 'wellle/context.vim' + }, -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the -- init.lua. If you want these files, they are in the repository, so you can just download them and @@ -990,5 +1014,11 @@ require('lazy').setup({ }, }) +require('lspconfig').clangd.setup { + cmd = { 'clangd', '--clang-tidy' }, +} +require('lspconfig').clangd.setup { + cmd = { '/home/sykop5am/.espressif/tools/esp-clang/16.0.1-fe4f10a809/esp-clang/bin/clangd', '--clang-tidy' }, +} -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et From 59e6f7246ef26ccc10aac74c1bca941d0ed570da Mon Sep 17 00:00:00 2001 From: Petr Sykora Date: Sun, 25 May 2025 10:59:29 +0200 Subject: [PATCH 3/5] fix: disable treesitter for html because it is crashing the neovim --- init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 71692c8ead6..0c3fa4df071 100644 --- a/init.lua +++ b/init.lua @@ -952,8 +952,9 @@ require('lazy').setup({ -- If you are experiencing weird indenting issues, add the language to -- the list of additional_vim_regex_highlighting and disabled languages for indent. additional_vim_regex_highlighting = { 'ruby' }, + disable = { "html" }, }, - indent = { enable = true, disable = { 'ruby' } }, + indent = { enable = true, disable = { 'ruby', "html" } }, }, -- There are additional nvim-treesitter modules that you can use to interact -- with nvim-treesitter. You should go explore a few and see what interests you: From ebdfd6f45ad0ac59078c9f8811a6d578c5bb5981 Mon Sep 17 00:00:00 2001 From: Petr Sykora Date: Sun, 6 Jul 2025 13:59:26 +0200 Subject: [PATCH 4/5] feat: disable treesitter indent for yaml --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 0c3fa4df071..6d576db26dc 100644 --- a/init.lua +++ b/init.lua @@ -954,7 +954,7 @@ require('lazy').setup({ additional_vim_regex_highlighting = { 'ruby' }, disable = { "html" }, }, - indent = { enable = true, disable = { 'ruby', "html" } }, + indent = { enable = true, disable = { 'ruby', "html", "yaml" } }, }, -- There are additional nvim-treesitter modules that you can use to interact -- with nvim-treesitter. You should go explore a few and see what interests you: From d430a7faa197bea137debb5c3f16724c53ce6c9f Mon Sep 17 00:00:00 2001 From: Petr Sykora Date: Thu, 21 Aug 2025 11:45:04 +0200 Subject: [PATCH 5/5] feat: switch to jetbrains kotlin lsp --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 6d576db26dc..f8226e94452 100644 --- a/init.lua +++ b/init.lua @@ -655,7 +655,7 @@ require('lazy').setup({ clangd = {}, gopls = {}, pyright = {}, - kotlin_language_server = {}, + kotlin_lsp = {}, phpactor = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs