mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-03-25 20:47:45 +01:00
Merge branch 'master' of git+ssh://github/tiynger/.dotfiles
This commit is contained in:
commit
a165c62469
@ -1,4 +1,4 @@
|
||||
vim.o.go = 'a'
|
||||
vim.o.go = "a"
|
||||
vim.o.showmode = false
|
||||
|
||||
-- disable netrw
|
||||
@ -6,11 +6,11 @@ vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
-- enable mouse for all modes
|
||||
vim.o.mouse = 'a'
|
||||
vim.o.clipboard = 'unnamedplus'
|
||||
vim.o.mouse = "a"
|
||||
vim.o.clipboard = "unnamedplus"
|
||||
|
||||
-- basic color settings
|
||||
vim.o.background = 'dark'
|
||||
vim.o.background = "dark"
|
||||
|
||||
-- setting Tab-length
|
||||
vim.o.expandtab = true
|
||||
@ -61,10 +61,10 @@ vim.o.nobackup = true
|
||||
vim.o.nowritebackup = true
|
||||
|
||||
-- set completeopt to have a better completion experience
|
||||
vim.o.completeopt = 'menuone,noselect'
|
||||
vim.o.completeopt = "menuone,noselect"
|
||||
|
||||
-- set completion option for command mode
|
||||
vim.o.wildmode = 'longest:full,full'
|
||||
vim.o.wildmode = "longest:full,full"
|
||||
|
||||
-- minimum number of lines around the cursor
|
||||
vim.o.scrolloff = 10
|
||||
@ -78,14 +78,14 @@ vim.o.undofile = true
|
||||
vim.o.undodir = vim.env.XDG_CACHE_HOME .. "/vim/undo"
|
||||
|
||||
-- python programs to use
|
||||
vim.g.python_host_prog = '/usr/bin/python2'
|
||||
vim.g.python3_host_prog = '/usr/bin/python3'
|
||||
vim.g.python_host_prog = "/usr/bin/python2"
|
||||
vim.g.python3_host_prog = "/usr/bin/python3"
|
||||
|
||||
-- folding
|
||||
vim.o.foldcolumn = '0'
|
||||
vim.o.foldcolumn = "0"
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 99
|
||||
vim.o.foldexpr = 'expr'
|
||||
vim.o.foldexpr = "expr"
|
||||
vim.o.foldenable = true
|
||||
vim.o.conceallevel = 0
|
||||
vim.g.markdown_folding = 1
|
||||
@ -98,34 +98,35 @@ vim.o.textwidth = 80
|
||||
-- read files correctly
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
c = 'c',
|
||||
h = 'c',
|
||||
html = 'html',
|
||||
java = 'java',
|
||||
js = 'javascript',
|
||||
lua = 'lua',
|
||||
md = 'markdown',
|
||||
nim = 'nim',
|
||||
py = 'python',
|
||||
sage = 'python',
|
||||
tex = 'tex',
|
||||
}
|
||||
c = "c",
|
||||
h = "c",
|
||||
html = "html",
|
||||
java = "java",
|
||||
js = "javascript",
|
||||
lua = "lua",
|
||||
md = "markdown",
|
||||
nim = "nim",
|
||||
py = "python",
|
||||
sage = "python",
|
||||
sh = "shell",
|
||||
tex = "tex",
|
||||
},
|
||||
})
|
||||
|
||||
-- set mapleader for hotkeys
|
||||
vim.g.mapleader = ","
|
||||
|
||||
-- load general mapped keys
|
||||
require('style')
|
||||
require("style")
|
||||
|
||||
-- load dictionaries and helper functions
|
||||
require('dictionaries')
|
||||
require("dictionaries")
|
||||
|
||||
-- load plugins (autoload all files in plugin folder)
|
||||
require('loadplugins')
|
||||
require("loadplugins")
|
||||
|
||||
-- load general mapped keys
|
||||
require('keymap')
|
||||
require("keymap")
|
||||
|
||||
vim.cmd([[
|
||||
set foldopen-=hor
|
||||
|
@ -5,10 +5,12 @@ return {
|
||||
config = function()
|
||||
require("conform").setup({
|
||||
formatters_by_ft = {
|
||||
python = { "isort", "yapf" },
|
||||
markdown = { "mdformat" },
|
||||
tex = { "latexindent" },
|
||||
lua = { "stylua" },
|
||||
markdown = { "mdformat" },
|
||||
python = { "isort", "yapf" },
|
||||
sh = { "beautysh" },
|
||||
shell = { "beautysh" },
|
||||
tex = { "latexindent" },
|
||||
yaml = { "yamlfmt" },
|
||||
},
|
||||
})
|
||||
@ -18,6 +20,12 @@ return {
|
||||
{ "-y=defaultIndent: ' '" }
|
||||
),
|
||||
}
|
||||
require("conform").formatters.beautysh = {
|
||||
args = require("conform.util").extend_args(
|
||||
require("conform.formatters.beautysh").args,
|
||||
{ "--indent-size=2", "--force-function-style=fnpar" }
|
||||
),
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ return {
|
||||
require("null-ls").setup({
|
||||
sources = {
|
||||
-- latex
|
||||
require("null-ls").builtins.formatting.latexindent,
|
||||
-- require("null-ls").builtins.formatting.latexindent,
|
||||
-- lua
|
||||
require("null-ls").builtins.formatting.stylua,
|
||||
-- markdown
|
||||
@ -17,6 +17,8 @@ return {
|
||||
-- python
|
||||
require("null-ls").builtins.formatting.isort,
|
||||
require("null-ls").builtins.formatting.yapf,
|
||||
-- shell
|
||||
-- require("null-ls").builtins.formatting.beautysh,
|
||||
-- yaml
|
||||
require("null-ls").builtins.formatting.yamlfmt,
|
||||
}
|
||||
@ -37,6 +39,8 @@ return {
|
||||
-- python
|
||||
"isort",
|
||||
"yapf",
|
||||
-- shell
|
||||
"beautysh",
|
||||
-- yaml
|
||||
"yamlfmt",
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user