-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
106 lines (85 loc) · 2.51 KB
/
Copy pathinit.lua
File metadata and controls
106 lines (85 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
-- ===========================================
-- Full Go IDE Setup for Neovim
-- ===========================================
-- Suppress lspconfig deprecation warning
vim.g.lspconfig_suppress_deprecation = true
-- Suppress ALL lspconfig deprecation warnings
local original_notify = vim.notify
vim.notify = function(msg, level, opts)
if type(msg) == "string" and (msg:match("lspconfig") or msg:match("deprecated")) then
return
end
return original_notify(msg, level, opts)
end
-- ===========================================
-- Full Go IDE Setup for Neovim
-- ===========================================
-- Leader key (her şeyden önce ayarlanmalı)
vim.g.mapleader = " "
vim.g.maplocalleader = " "
-- ===========================================
-- Temel Ayarlar
-- ===========================================
local opt = vim.opt
-- Satır numaraları
opt.number = true
opt.relativenumber = true
-- Tab/Indent
opt.tabstop = 4
opt.shiftwidth = 4
opt.expandtab = true
opt.smartindent = true
opt.autoindent = true
-- Arama
opt.ignorecase = true
opt.smartcase = true
opt.hlsearch = true
opt.incsearch = true
-- Görünüm
opt.termguicolors = true
opt.signcolumn = "yes"
opt.cursorline = true
opt.scrolloff = 8
opt.sidescrolloff = 8
opt.wrap = false
-- Split yönleri
opt.splitright = true
opt.splitbelow = true
-- Performans
opt.updatetime = 250
opt.timeoutlen = 300
-- Undo history
opt.undofile = true
opt.undodir = vim.fn.stdpath("data") .. "/undo"
-- Clipboard (sistem clipboard'u ile senkron)
opt.clipboard = "unnamedplus"
-- Mouse desteği
opt.mouse = "a"
-- ===========================================
-- Lazy.nvim Bootstrap
-- ===========================================
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
print("Lazy.nvim indiriliyor...")
vim.fn.system({
"git", "clone", "--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- Plugin'leri yükle
require("lazy").setup("plugins", {
install = { colorscheme = { "tokyonight" } },
checker = { enabled = true, notify = false },
change_detection = { notify = false },
})
-- Keymaps
require("keymaps")
-- Autosave: Focus kaybedince veya buffer değişince kaydet
vim.api.nvim_create_autocmd({ "BufLeave", "FocusLost" }, {
pattern = "*",
command = "silent! wa",
})
-- Ctrl+Click ile definition'a git
vim.keymap.set("n", "<C-LeftMouse>", "<LeftMouse><cmd>lua vim.lsp.buf.definition()<CR>", { desc = "Go to definition" })