-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.lua
More file actions
127 lines (105 loc) · 3.13 KB
/
Copy pathoptions.lua
File metadata and controls
127 lines (105 loc) · 3.13 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
vim.opt.expandtab = true -- Convert tabs to spaces
vim.opt.shiftwidth = 4 -- Amount to indent with << and >>
vim.opt.tabstop = 4 -- How many spaces are shown per Tab
vim.opt.softtabstop = 4 -- How many spaces are applied when pressing Tab
vim.opt.smarttab = true
vim.opt.smartindent = true
vim.opt.autoindent = true -- Keep identation from previous line
-- Enable break indent
vim.opt.breakindent = true
-- Always show relative line numbers
vim.opt.number = true
vim.opt.relativenumber = true
-- Show line under cursor
vim.opt.cursorline = true
-- Store undos between sessions
vim.opt.undofile = true
-- Enable mouse mode, can be useful for resizing splits for example!
vim.opt.mouse = "a"
-- Use the system clipboard for yank/delete/change — paste with Ctrl+V elsewhere.
-- Note: this also routes deletes (d, c, x) through the clipboard.
vim.opt.clipboard = "unnamedplus"
-- Don't show the mode, since it's already in the status line
vim.opt.showmode = false
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
vim.opt.ignorecase = true
vim.opt.smartcase = true
-- Keep signcolumn on by default
vim.opt.signcolumn = "yes"
-- Configure how new splits should be opened
vim.opt.splitright = true
vim.opt.splitbelow = true
-- Sets how neovim will display certain whitespace characters in the editor.
-- See `:help 'list'`
-- and `:help 'listchars'`
vim.opt.list = true
vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
-- Minimal number of screen lines to keep above and below the cursor.
vim.opt.scrolloff = 5
-- Timeout length for multi key hotkeys
vim.opt.timeoutlen = 500
-- How long the cursor must sit still before CursorHold fires (used by the
-- LSP diagnostic auto-popup). Default is 4000ms, way too slow.
vim.opt.updatetime = 250
-- optionally enable 24-bit colour
vim.opt.termguicolors = true
-- disable netrw for nvim-tree
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- Enable 24-bit colour
vim.opt.termguicolors = true
-- Keep multiple buffers and open multiple buffers
hidden = true
-- Always show tabline
vim.o.showtabline = 2
-- Project-local config: when nvim starts in a directory containing a
-- `.nvim.lua` (or `.nvimrc`/`.exrc`), source it. This is how a project layers
-- extra settings / LSP servers on top of this base config without launching
-- nvim a special way. Gated by `vim.secure`: the first time nvim sees a given
-- file it prompts to trust it (`:trust`) and remembers the hash, so an
-- untrusted file in someone else's repo can't run code silently.
-- See README.md → "Per-project configuration".
vim.o.exrc = true
-- Show a vertical line at column 80 for programming files
vim.api.nvim_create_autocmd("FileType", {
pattern = {
"c",
"cpp",
"python",
"rust",
"go",
"java",
"javascript",
"typescript",
"javascriptreact",
"typescriptreact",
"lua",
"sh",
"bash",
"zsh",
"fish",
"ruby",
"php",
"perl",
"haskell",
"ocaml",
"elixir",
"erlang",
"scala",
"kotlin",
"swift",
"cs",
"fsharp",
"clojure",
"nix",
"vim",
"sql",
"r",
"julia",
"dart",
"zig",
},
callback = function()
vim.opt_local.colorcolumn = "80"
end,
})