Meine Anpassungen an kickstart.nvim
This commit is contained in:
parent
e947649cb0
commit
7027051b4a
4
init.lua
4
init.lua
|
@ -91,7 +91,7 @@ vim.g.mapleader = ' '
|
||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
-- 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 ]]
|
-- [[ Setting options ]]
|
||||||
-- See `:help vim.opt`
|
-- See `:help vim.opt`
|
||||||
|
@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
-- You can also add relative line numbers, to help with jumping.
|
-- You can also add relative line numbers, to help with jumping.
|
||||||
-- Experiment for yourself to see if you like it!
|
-- Experiment for yourself to see if you like it!
|
||||||
-- vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||||
vim.opt.mouse = 'a'
|
vim.opt.mouse = 'a'
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
return {
|
||||||
|
'stevearc/conform.nvim',
|
||||||
|
event = { 'BufReadPre', 'BufNewFile' },
|
||||||
|
config = function()
|
||||||
|
local conform = require 'conform'
|
||||||
|
|
||||||
|
conform.setup {
|
||||||
|
formatters_by_ft = {
|
||||||
|
javascript = { 'prettier' },
|
||||||
|
typescript = { 'prettier' },
|
||||||
|
javascriptreact = { 'prettier' },
|
||||||
|
typescriptreact = { 'prettier' },
|
||||||
|
svelte = { 'prettier' },
|
||||||
|
css = { 'prettier' },
|
||||||
|
html = { 'prettier' },
|
||||||
|
json = { 'prettier' },
|
||||||
|
yaml = { 'prettier' },
|
||||||
|
markdown = { 'prettier' },
|
||||||
|
graphql = { 'prettier' },
|
||||||
|
lua = { 'stylua' },
|
||||||
|
python = { 'isort', 'black', 'ruff' },
|
||||||
|
},
|
||||||
|
format_on_save = {
|
||||||
|
lsp_fallback = true,
|
||||||
|
async = false,
|
||||||
|
timeout_ms = 500,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
vim.keymap.set({ 'n', 'v' }, '<leader>mp', function()
|
||||||
|
conform.format {
|
||||||
|
lsp_fallback = true,
|
||||||
|
async = false,
|
||||||
|
timeout_ms = 1000,
|
||||||
|
}
|
||||||
|
end, { desc = 'Format file or range (in visual mode)' })
|
||||||
|
end,
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
-- disable netrw
|
||||||
|
vim.g.loaded_netrw = 1
|
||||||
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
|
||||||
|
-- Disable line wrap
|
||||||
|
vim.opt.wrap = false
|
||||||
|
|
||||||
|
-- No swap file
|
||||||
|
vim.opt.swapfile = false
|
||||||
|
|
||||||
|
-- Set shiftwidth and tabstop
|
||||||
|
vim.opt.shiftwidth = 4
|
||||||
|
vim.opt.tabstop = 4
|
||||||
|
vim.opt.softtabstop = 4
|
||||||
|
|
||||||
|
vim.opt.termguicolors = true
|
||||||
|
|
||||||
|
return {}
|
Loading…
Reference in New Issue