From 3d6b0934b0295ee489be7a59fb37400ffc5e1023 Mon Sep 17 00:00:00 2001 From: Mikolaj_Bien Date: Tue, 6 May 2025 09:44:25 +0200 Subject: [PATCH 1/4] feat: disable wraping --- init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.lua b/init.lua index 674dc928..24deaea7 100644 --- a/init.lua +++ b/init.lua @@ -52,6 +52,8 @@ vim.opt.splitbelow = true vim.opt.list = false vim.opt.listchars = { trail = '·', nbsp = '␣', tab = ' ' } +vim.opt.wrap = false + vim.opt.tabstop = 2 -- Number of spaces that a in the file counts for vim.opt.shiftwidth = 2 -- Number of spaces to use for each step of (auto)indent vim.opt.expandtab = true -- Use spaces instead of actual tab characters From 3f6943207a2529571bb8ef21c6162bc1db759fcb Mon Sep 17 00:00:00 2001 From: Mikolaj_Bien Date: Fri, 9 May 2025 14:35:28 +0200 Subject: [PATCH 2/4] feat: add gitlab plugin --- lua/plugins/gitlab.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lua/plugins/gitlab.lua diff --git a/lua/plugins/gitlab.lua b/lua/plugins/gitlab.lua new file mode 100644 index 00000000..5efd6694 --- /dev/null +++ b/lua/plugins/gitlab.lua @@ -0,0 +1,19 @@ +return { + 'https://gitlab.com/gitlab-org/editor-extensions/gitlab.vim.git', + -- Activate when a file is created/opened + event = { 'BufReadPre', 'BufNewFile' }, + -- Activate when a supported filetype is open + ft = { 'go', 'javascript', 'python', 'ruby' }, + cond = function() + -- Only activate if token is present in environment variable. + -- Remove this line to use the interactive workflow. + return vim.env.GITLAB_TOKEN ~= nil and vim.env.GITLAB_TOKEN ~= '' + end, + opts = { + statusline = { + -- Hook into the built-in statusline to indicate the status + -- of the GitLab Duo Code Suggestions integration + enabled = true, + }, + }, +} From bb52f8676ea3ac8082e4c0af17345bf1304e82c1 Mon Sep 17 00:00:00 2001 From: Mikolaj_Bien Date: Thu, 15 May 2025 08:21:17 +0200 Subject: [PATCH 3/4] feat: add buffer delete --- init.lua | 8 ++++++++ lua/config/keymap.lua | 15 +++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/init.lua b/init.lua index 24deaea7..819cdad9 100644 --- a/init.lua +++ b/init.lua @@ -86,6 +86,14 @@ vim.api.nvim_create_autocmd('TextYankPost', { vim.highlight.on_yank() end, }) + +vim.api.nvim_create_autocmd('FileType', { + pattern = 'neo-tree', + callback = function() + vim.wo.winfixwidth = true + end, +}) + require 'config.keymap' require 'config.lazy' diff --git a/lua/config/keymap.lua b/lua/config/keymap.lua index 38a22b50..0eb5c922 100644 --- a/lua/config/keymap.lua +++ b/lua/config/keymap.lua @@ -58,3 +58,18 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the upper win -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` + +-- buffers + +local function close_other_buffers() + local current = vim.api.nvim_get_current_buf() + local bufs = vim.api.nvim_list_bufs() + + for _, buf in ipairs(bufs) do + if vim.api.nvim_buf_is_loaded(buf) and buf ~= current then + vim.api.nvim_buf_delete(buf, { force = true }) + end + end +end +vim.keymap.set('n', 'bd', ':bd', { desc = 'Close current buffer' }) +vim.keymap.set('n', 'bo', close_other_buffers, { desc = 'Close all buffers except current' }) From 47cbf2ddb127fbf0873ee707bdd635f7cff43279 Mon Sep 17 00:00:00 2001 From: Mikolaj_Bien Date: Fri, 16 May 2025 11:12:04 +0200 Subject: [PATCH 4/4] feat: add omnisharp config for lsp --- lua/plugins/lspconfig.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index f70673d3..b6a5251d 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -98,8 +98,9 @@ return { -- Main LSP Configuration } local capabilities = require('blink.cmp').get_lsp_capabilities() + local lspconfig = require 'lspconfig' - require('lspconfig').sourcekit.setup { + lspconfig.sourcekit.setup { capabilities = { workspace = { didChangeWatchedFiles = { @@ -109,6 +110,15 @@ return { -- Main LSP Configuration }, } + lspconfig.omnisharp.setup { + capabilities = capabilities, + enable_roslyn_analysers = true, + enable_import_completion = true, + organize_imports_on_format = true, + enable_decompilation_support = true, + filetypes = { 'cs', 'vb', 'csproj', 'sln', 'slnx', 'props', 'csx', 'targets', 'tproj', 'slngen', 'fproj' }, + } + local servers = { lua_ls = { settings = {