mirror of
https://github.com/kristoferssolo/SoloVim.git
synced 2025-10-21 20:10:41 +00:00
Update 04.02.2023
This commit is contained in:
parent
fb9f1ab0c3
commit
b139246879
@ -62,7 +62,7 @@ vim.api.nvim_create_autocmd({ "InsertEnter" }, {
|
|||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||||
pattern = { "c", "cpp", "yaml", "vimwiki", "markdown", "html", "css", "json" },
|
pattern = { "vimwiki" },
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.opt_local.ts = 2
|
vim.opt_local.ts = 2
|
||||||
vim.opt_local.sw = 2
|
vim.opt_local.sw = 2
|
||||||
@ -74,12 +74,20 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
|
|||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
highlight CursorLine ctermbg=White cterm=bold guibg=#222222
|
highlight CursorLine ctermbg=White cterm=bold guibg=#222222
|
||||||
highlight CursorColumn ctermbg=White cterm=bold guibg=#222222
|
highlight CursorColumn ctermbg=White cterm=bold guibg=#222222
|
||||||
autocmd FileType python imap <buffer> <C-b> <esc><cmd>w<cr><cmd>exec "!python3" shellescape(@%, 1)<cr>
|
]])
|
||||||
autocmd FileType python map <buffer> <C-b> <cmd>w<cr><cmd>exec "!python3" shellescape(@%, 1)<cr>
|
|
||||||
autocmd FileType rust imap <buffer> <C-b> <esc><cmd>w<cr><cmd>exec "!cargo run"<cr>
|
-- Run file
|
||||||
autocmd FileType rust map <buffer> <C-b> <cmd>w<cr><cmd>exec "!cargo run"<cr>
|
vim.cmd([[
|
||||||
autocmd FileType tex imap <buffer> <C-b> <esc><cmd>w<cr><cmd>exec "silent !lualatex %"<cr>
|
augroup run_file
|
||||||
autocmd FileType tex map <buffer> <C-b> <esc><cmd>w<cr><cmd>exec "silent !lualatex %"<cr>
|
autocmd FileType python imap <buffer> <C-b> <esc><cmd>w<cr><cmd>exec "!python3 %"<cr>
|
||||||
|
autocmd FileType python map <buffer> <C-b> <cmd>w<cr><cmd>exec "!python3 %"<cr>
|
||||||
|
autocmd FileType rust imap <buffer> <C-b> <esc><cmd>w<cr><cmd>exec "!cargo run"<cr>
|
||||||
|
autocmd FileType rust map <buffer> <C-b> <cmd>w<cr><cmd>exec "!cargo run"<cr>
|
||||||
|
autocmd FileType tex imap <buffer> <C-b> <esc><cmd>w<cr><cmd>exec "silent !lualatex %"<cr>
|
||||||
|
autocmd FileType tex map <buffer> <C-b> <esc><cmd>w<cr><cmd>exec "silent !lualatex %"<cr>
|
||||||
|
autocmd FileType cpp imap <buffer> <C-b> <esc><cmd>w<cr><cmd>exec "!g++ % -o %:r && %:r"<cr>
|
||||||
|
autocmd FileType cpp map <buffer> <C-b> <cmd>w<cr><cmd>exec "!g++ % -o %:r && %:r"<cr>
|
||||||
|
augroup end
|
||||||
]])
|
]])
|
||||||
|
|
||||||
-- Autocommand that reloads waybar whenever you save the ~/.config/waybar/config file
|
-- Autocommand that reloads waybar whenever you save the ~/.config/waybar/config file
|
||||||
|
|||||||
@ -4,11 +4,11 @@ if not status_ok then
|
|||||||
end
|
end
|
||||||
|
|
||||||
colorizer.setup({
|
colorizer.setup({
|
||||||
filetypes = { "*" },
|
filetypes = { "html", "css", "js" },
|
||||||
user_default_options = {
|
user_default_options = {
|
||||||
RGB = true, -- #RGB hex codes
|
RGB = true, -- #RGB hex codes
|
||||||
RRGGBB = true, -- #RRGGBB hex codes
|
RRGGBB = true, -- #RRGGBB hex codes
|
||||||
names = true, -- "Name" codes like Blue or blue
|
names = false, -- "Name" codes like Blue or blue
|
||||||
RRGGBBAA = true, -- #RRGGBBAA hex codes
|
RRGGBBAA = true, -- #RRGGBBAA hex codes
|
||||||
AARRGGBB = true, -- 0xAARRGGBB hex codes
|
AARRGGBB = true, -- 0xAARRGGBB hex codes
|
||||||
rgb_fn = true, -- CSS rgb() and rgba() functions
|
rgb_fn = true, -- CSS rgb() and rgba() functions
|
||||||
@ -23,13 +23,12 @@ colorizer.setup({
|
|||||||
-- parsers can contain values used in |user_default_options|
|
-- parsers can contain values used in |user_default_options|
|
||||||
sass = {
|
sass = {
|
||||||
enable = true,
|
enable = true,
|
||||||
parsers = { css },
|
parsers = { "css" },
|
||||||
}, -- Enable sass colors
|
}, -- Enable sass colors
|
||||||
virtualtext = "■",
|
virtualtext = "■",
|
||||||
},
|
},
|
||||||
-- all the sub-options of filetypes apply to buftypes
|
-- all the sub-options of filetypes apply to buftypes
|
||||||
buftypes = {},
|
buftypes = {},
|
||||||
html = { names = false },
|
-- html = { names = true },
|
||||||
markdown = { names = false },
|
-- css = { names = true },
|
||||||
vimwiki = { names = false },
|
|
||||||
})
|
})
|
||||||
|
|||||||
@ -5,6 +5,7 @@ local opts = { silent = true }
|
|||||||
|
|
||||||
--Remap space as leader key
|
--Remap space as leader key
|
||||||
keymap("", "<Space>", "<Nop>", opts)
|
keymap("", "<Space>", "<Nop>", opts)
|
||||||
|
keymap("n", "q", "<Nop>", opts)
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
|
|
||||||
-- Modes
|
-- Modes
|
||||||
@ -16,6 +17,11 @@ vim.g.mapleader = " "
|
|||||||
-- command_mode = "c",
|
-- command_mode = "c",
|
||||||
|
|
||||||
-- Normal --
|
-- Normal --
|
||||||
|
keymap("n", "<C-d>", "<C-d>zz", opts)
|
||||||
|
keymap("n", "<C-u>", "<C-u>zz", opts)
|
||||||
|
keymap("n", "n", "nzzzv", opts)
|
||||||
|
keymap("n", "N", "Nzzzv", opts)
|
||||||
|
|
||||||
-- Better window navigation
|
-- Better window navigation
|
||||||
keymap("n", "<C-h>", "<C-w>h", opts)
|
keymap("n", "<C-h>", "<C-w>h", opts)
|
||||||
keymap("n", "<C-j>", "<C-w>j", opts)
|
keymap("n", "<C-j>", "<C-w>j", opts)
|
||||||
|
|||||||
@ -34,7 +34,8 @@ local servers = {
|
|||||||
"emmet_ls",
|
"emmet_ls",
|
||||||
"html",
|
"html",
|
||||||
"jsonls",
|
"jsonls",
|
||||||
"pyright",
|
-- "pyright",
|
||||||
|
"jedi_language_server",
|
||||||
"rust_analyzer",
|
"rust_analyzer",
|
||||||
"sumneko_lua",
|
"sumneko_lua",
|
||||||
"taplo",
|
"taplo",
|
||||||
@ -55,11 +56,12 @@ mason_tool.setup({
|
|||||||
"json-lsp",
|
"json-lsp",
|
||||||
"lua-language-server",
|
"lua-language-server",
|
||||||
"marksman",
|
"marksman",
|
||||||
"pyright",
|
-- "pyright",
|
||||||
|
"jedi-language-server",
|
||||||
"rust-analyzer",
|
"rust-analyzer",
|
||||||
"taplo",
|
"taplo",
|
||||||
"texlab",
|
"texlab",
|
||||||
-- "typescript-language-server",
|
"typescript-language-server",
|
||||||
"vim-language-server",
|
"vim-language-server",
|
||||||
"yaml-language-server",
|
"yaml-language-server",
|
||||||
},
|
},
|
||||||
@ -81,10 +83,10 @@ for _, server in pairs(servers) do
|
|||||||
opts = vim.tbl_deep_extend("force", sumneko_opts, opts)
|
opts = vim.tbl_deep_extend("force", sumneko_opts, opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
if server == "pyright" then
|
-- if server == "jedi_language_server" then
|
||||||
local pyright_opts = require("user.mason.settings.pyright")
|
-- local pyright_opts = require("user.mason.settings.jedi")
|
||||||
opts = vim.tbl_deep_extend("force", pyright_opts, opts)
|
-- opts = vim.tbl_deep_extend("force", pyright_opts, opts)
|
||||||
end
|
-- end
|
||||||
|
|
||||||
-- if server == "clangd" then
|
-- if server == "clangd" then
|
||||||
-- local clangd_opts = require("user.mason.settings.clangd")
|
-- local clangd_opts = require("user.mason.settings.clangd")
|
||||||
|
|||||||
@ -17,20 +17,33 @@ local diagnostics = null_ls.builtins.diagnostics
|
|||||||
null_ls.setup({
|
null_ls.setup({
|
||||||
debug = false,
|
debug = false,
|
||||||
sources = {
|
sources = {
|
||||||
formatting.prettier.with({
|
|
||||||
extra_filetypes = { "toml" },
|
|
||||||
extra_args = { "--no-semi", "--single-quote", "--jsx-single-quote", "--no-bracket-spacing" },
|
|
||||||
}),
|
|
||||||
formatting.autopep8,
|
formatting.autopep8,
|
||||||
formatting.stylua,
|
|
||||||
formatting.beautysh,
|
formatting.beautysh,
|
||||||
formatting.djlint,
|
formatting.djlint,
|
||||||
formatting.tidy,
|
formatting.prettier.with({
|
||||||
|
extra_filetypes = { "toml" },
|
||||||
|
extra_args = {
|
||||||
|
"--no-semi",
|
||||||
|
"--double-quote",
|
||||||
|
"--no-bracket-spacing",
|
||||||
|
"--tab-width",
|
||||||
|
"4",
|
||||||
|
"--bracket-same-line",
|
||||||
|
"--html-whitespace-sensitivity",
|
||||||
|
"strict",
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
formatting.shfmt,
|
||||||
|
formatting.stylua,
|
||||||
|
formatting.isort,
|
||||||
|
formatting.yamlfmt,
|
||||||
diagnostics.cpplint,
|
diagnostics.cpplint,
|
||||||
diagnostics.luacheck,
|
diagnostics.luacheck,
|
||||||
diagnostics.pylint,
|
diagnostics.flake8,
|
||||||
diagnostics.mypy,
|
diagnostics.mypy,
|
||||||
diagnostics.zsh,
|
diagnostics.zsh,
|
||||||
|
diagnostics.misspell,
|
||||||
|
diagnostics.codespell,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -38,17 +51,17 @@ mason_null_ls.setup({
|
|||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"autopep8",
|
"autopep8",
|
||||||
"beautysh",
|
"beautysh",
|
||||||
"djlint",
|
|
||||||
"shfmt",
|
|
||||||
"yamlfmt",
|
|
||||||
"codespell",
|
"codespell",
|
||||||
"cpplint",
|
"cpplint",
|
||||||
|
"djlint",
|
||||||
|
"flake8",
|
||||||
|
"gitlint",
|
||||||
|
"html_lint",
|
||||||
"luacheck",
|
"luacheck",
|
||||||
"misspell",
|
"misspell",
|
||||||
"pylint",
|
|
||||||
"mypy",
|
"mypy",
|
||||||
"html_lint",
|
"shfmt",
|
||||||
"gitlint",
|
"yamlfmt",
|
||||||
},
|
},
|
||||||
automatic_installation = true,
|
automatic_installation = true,
|
||||||
automatic_setup = true,
|
automatic_setup = true,
|
||||||
|
|||||||
@ -1,9 +0,0 @@
|
|||||||
return {
|
|
||||||
settings = {
|
|
||||||
python = {
|
|
||||||
analysis = {
|
|
||||||
typeCheckingMode = "true",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@ -105,6 +105,7 @@ return packer.startup(function(use)
|
|||||||
use("nvim-treesitter/nvim-treesitter")
|
use("nvim-treesitter/nvim-treesitter")
|
||||||
use("p00f/nvim-ts-rainbow")
|
use("p00f/nvim-ts-rainbow")
|
||||||
use("mechatroner/rainbow_csv")
|
use("mechatroner/rainbow_csv")
|
||||||
|
use("mtdl9/vim-log-highlighting")
|
||||||
|
|
||||||
-- Git
|
-- Git
|
||||||
use("lewis6991/gitsigns.nvim")
|
use("lewis6991/gitsigns.nvim")
|
||||||
@ -115,6 +116,8 @@ return packer.startup(function(use)
|
|||||||
use("jayp0521/mason-nvim-dap.nvim")
|
use("jayp0521/mason-nvim-dap.nvim")
|
||||||
use("ravenxrz/DAPInstall.nvim")
|
use("ravenxrz/DAPInstall.nvim")
|
||||||
|
|
||||||
|
use("ThePrimeagen/vim-be-good")
|
||||||
|
|
||||||
-- Automatically set up your configuration after cloning packer.nvim
|
-- Automatically set up your configuration after cloning packer.nvim
|
||||||
-- Put this at the end after all plugins
|
-- Put this at the end after all plugins
|
||||||
if PACKER_BOOTSTRAP then
|
if PACKER_BOOTSTRAP then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user