This commit is contained in:
bieniucieniu 2025-05-18 19:49:54 +02:00
commit 74f90c60a0
4 changed files with 55 additions and 1 deletions

View File

@ -54,6 +54,8 @@ vim.opt.splitbelow = true
vim.opt.list = false vim.opt.list = false
vim.opt.listchars = { trail = '·', nbsp = '', tab = ' ' } vim.opt.listchars = { trail = '·', nbsp = '', tab = ' ' }
vim.opt.wrap = false
vim.opt.tabstop = 2 -- Number of spaces that a <Tab> in the file counts for vim.opt.tabstop = 2 -- Number of spaces that a <Tab> in the file counts for
vim.opt.shiftwidth = 2 -- Number of spaces to use for each step of (auto)indent 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 vim.opt.expandtab = true -- Use spaces instead of actual tab characters
@ -86,6 +88,14 @@ vim.api.nvim_create_autocmd('TextYankPost', {
vim.highlight.on_yank() vim.highlight.on_yank()
end, end,
}) })
vim.api.nvim_create_autocmd('FileType', {
pattern = 'neo-tree',
callback = function()
vim.wo.winfixwidth = true
end,
})
require 'config.keymap' require 'config.keymap'
require 'config.lazy' require 'config.lazy'

View File

@ -58,3 +58,18 @@ vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper win
-- [[ Basic Autocommands ]] -- [[ Basic Autocommands ]]
-- See `:help lua-guide-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', '<leader>bd', ':bd<CR>', { desc = 'Close current buffer' })
vim.keymap.set('n', '<leader>bo', close_other_buffers, { desc = 'Close all buffers except current' })

19
lua/plugins/gitlab.lua Normal file
View File

@ -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,
},
},
}

View File

@ -98,8 +98,9 @@ return { -- Main LSP Configuration
} }
local capabilities = require('blink.cmp').get_lsp_capabilities() local capabilities = require('blink.cmp').get_lsp_capabilities()
local lspconfig = require 'lspconfig'
require('lspconfig').sourcekit.setup { lspconfig.sourcekit.setup {
capabilities = { capabilities = {
workspace = { workspace = {
didChangeWatchedFiles = { 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 = { local servers = {
lua_ls = { lua_ls = {
settings = { settings = {