Skip to content

Commit 7027051

Browse files
committed
Meine Anpassungen an kickstart.nvim
1 parent e947649 commit 7027051

File tree

3 files changed

+58
-2
lines changed

3 files changed

+58
-2
lines changed

init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ vim.g.mapleader = ' '
9191
vim.g.maplocalleader = ' '
9292

9393
-- Set to true if you have a Nerd Font installed and selected in the terminal
94-
vim.g.have_nerd_font = false
94+
vim.g.have_nerd_font = true
9595

9696
-- [[ Setting options ]]
9797
-- See `:help vim.opt`
@@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
102102
vim.opt.number = true
103103
-- You can also add relative line numbers, to help with jumping.
104104
-- Experiment for yourself to see if you like it!
105-
-- vim.opt.relativenumber = true
105+
vim.opt.relativenumber = true
106106

107107
-- Enable mouse mode, can be useful for resizing splits for example!
108108
vim.opt.mouse = 'a'

lua/custom/plugins/formatting.lua

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
return {
2+
'stevearc/conform.nvim',
3+
event = { 'BufReadPre', 'BufNewFile' },
4+
config = function()
5+
local conform = require 'conform'
6+
7+
conform.setup {
8+
formatters_by_ft = {
9+
javascript = { 'prettier' },
10+
typescript = { 'prettier' },
11+
javascriptreact = { 'prettier' },
12+
typescriptreact = { 'prettier' },
13+
svelte = { 'prettier' },
14+
css = { 'prettier' },
15+
html = { 'prettier' },
16+
json = { 'prettier' },
17+
yaml = { 'prettier' },
18+
markdown = { 'prettier' },
19+
graphql = { 'prettier' },
20+
lua = { 'stylua' },
21+
python = { 'isort', 'black', 'ruff' },
22+
},
23+
format_on_save = {
24+
lsp_fallback = true,
25+
async = false,
26+
timeout_ms = 500,
27+
},
28+
}
29+
30+
vim.keymap.set({ 'n', 'v' }, '<leader>mp', function()
31+
conform.format {
32+
lsp_fallback = true,
33+
async = false,
34+
timeout_ms = 1000,
35+
}
36+
end, { desc = 'Format file or range (in visual mode)' })
37+
end,
38+
}

lua/custom/plugins/vimconfig.lua

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
-- disable netrw
2+
vim.g.loaded_netrw = 1
3+
vim.g.loaded_netrwPlugin = 1
4+
5+
-- Disable line wrap
6+
vim.opt.wrap = false
7+
8+
-- No swap file
9+
vim.opt.swapfile = false
10+
11+
-- Set shiftwidth and tabstop
12+
vim.opt.shiftwidth = 4
13+
vim.opt.tabstop = 4
14+
vim.opt.softtabstop = 4
15+
16+
vim.opt.termguicolors = true
17+
18+
return {}

0 commit comments

Comments
 (0)