Add old customizations

This commit is contained in:
Salih TAŞDELEN 2026-03-19 21:40:01 +03:00
parent 58170c7ae3
commit 520d1958da
1 changed files with 61 additions and 14 deletions

View File

@ -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.o`
@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
vim.o.number = true
-- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it!
-- vim.o.relativenumber = true
vim.o.relativenumber = true
-- Enable mouse mode, can be useful for resizing splits for example!
vim.o.mouse = 'a'
@ -119,6 +119,12 @@ vim.schedule(function() vim.o.clipboard = 'unnamedplus' end)
-- Enable break indent
vim.o.breakindent = true
-- Expand tabs to 4 spaces, enable smartinden
vim.opt.expandtab = true
vim.opt.smartindent = true
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
-- Enable undo/redo changes even after closing and reopening a file
vim.o.undofile = true
@ -257,7 +263,24 @@ rtp:prepend(lazypath)
require('lazy').setup({
-- NOTE: Plugins can be added via a link or github org/name. To run setup automatically, use `opts = {}`
{ 'NMAC427/guess-indent.nvim', opts = {} },
{
'christoomey/vim-tmux-navigator',
cmd = {
'TmuxNavigateLeft',
'TmuxNavigateDown',
'TmuxNavigateUp',
'TmuxNavigateRight',
'TmuxNavigatePrevious',
'TmuxNavigatorProcessList',
},
keys = {
{ '<c-h>', '<cmd><C-U>TmuxNavigateLeft<cr>' },
{ '<c-j>', '<cmd><C-U>TmuxNavigateDown<cr>' },
{ '<c-k>', '<cmd><C-U>TmuxNavigateUp<cr>' },
{ '<c-l>', '<cmd><C-U>TmuxNavigateRight<cr>' },
{ '<c-\\>', '<cmd><C-U>TmuxNavigatePrevious<cr>' },
},
},
-- Alternatively, use `config = function() ... end` for full control over the configuration.
-- If you prefer to call `setup` explicitly, use:
-- {
@ -600,9 +623,10 @@ require('lazy').setup({
-- See `:help lsp-config` for information about keys and how to configure
---@type table<string, vim.lsp.Config>
local servers = {
-- clangd = {},
clangd = {},
cpptools = {},
-- gopls = {},
-- pyright = {},
pyright = {},
-- rust_analyzer = {},
--
-- Some languages (like typescript) have entire language plugins that can be useful:
@ -697,8 +721,9 @@ require('lazy').setup({
formatters_by_ft = {
lua = { 'stylua' },
-- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" },
--
python = { 'isort', 'black' },
cpp = { 'clang-format' },
c = { 'clang-format' },
-- You can use 'stop_after_first' to run the first available formatter from the list
-- javascript = { "prettierd", "prettier", stop_after_first = true },
},
@ -874,7 +899,29 @@ require('lazy').setup({
branch = 'main',
-- [[ Configure Treesitter ]] See `:help nvim-treesitter-intro`
config = function()
local parsers = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }
local parsers = {
'bash',
'c',
'cpp',
'make',
'cmake',
'python',
'diff',
'json',
'jsonc',
'html',
'xml',
'yaml',
'toml',
'lua',
'luadoc',
'markdown',
'markdown_inline',
'query',
'vim',
'vimdoc',
}
require('nvim-treesitter').install(parsers)
vim.api.nvim_create_autocmd('FileType', {
callback = function(args)
@ -909,12 +956,12 @@ require('lazy').setup({
-- Here are some example plugins that I've included in the Kickstart repository.
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
--
-- require 'kickstart.plugins.debug',
-- require 'kickstart.plugins.indent_line',
-- require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.autopairs',
-- require 'kickstart.plugins.neo-tree',
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommended keymaps
require 'kickstart.plugins.debug',
require 'kickstart.plugins.indent_line',
require 'kickstart.plugins.lint',
require 'kickstart.plugins.autopairs',
require 'kickstart.plugins.neo-tree',
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommended keymaps
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- This is the easiest way to modularize your config.