feat: some stuff

This commit is contained in:
max_richter 2022-05-03 11:40:07 +02:00
parent b0e54888bb
commit df0bcb87cf
15 changed files with 89 additions and 212 deletions

View File

@ -1,78 +0,0 @@
Xft.autohint: 0
Xft.dpi: 96
Xft.antialias: true
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault
URxvt.font: xft:FiraMono Nerd Font:size=11:antialias=true
URxvt.boldFont: xft:FiraMono Nerd Font:bold:size=11:antialias=true
URxvt.italicFont: xft:FiraMono Nerd Font:italic:size=11:antialias=true
URxvt.letterSpace: -1
URxvt.lineSpace: 0
URxvt.geometry: 92x24
URxvt.internalBorder: 10
URxvt.externalBorder: 0
URxvt.cursorBlink: true
URxvt.cursorUnderline: false
URxvt.saveline: 2048
URxvt.scrollBar: false
URxvt.scrollBar_right: false
URxvt.urgentOnBell: true
URxvt.depth: 24
URxvt.imLocale: en_US.utf8
URxvt.perl-ext-common: default,matcher,font-size
URxvt.font-size.step: 2
! Resize Text
URxvt.keysym.C-Up: font-size:increase
URxvt.keysym.C-Down: font-size:decrease
! Enable Copy/Paste
Rxvt.iso14755: false
URxvt.iso14755_52: false
URxvt.keysym.Shift-Control-V: eval:paste_clipboard
URxvt.keysym.Shift-Control-C: eval:selection_to_clipboard
! margins
*.gap: 6
! special
*.foreground: #c0c5ce
*.background: #2b303b
*.cursorColor: #c0c5ce
! black
*.color0: #2b303b
*.color8: #65737e
! red
*.color1: #bf616a
*.color9: #bf616a
! green
*.color2: #a3be8c
*.color10: #a3be8c
! yellow
*.color3: #ebcb8b
*.color11: #ebcb8b
! blue
*.color4: #8fa1b3
*.color12: #8fa1b3
! magenta
*.color5: #b48ead
*.color13: #b48ead
! cyan
*.color6: #96b5b4
*.color14: #96b5b4
! white
*.color7: #c0c5ce
*.color15: #eff1f5

View File

View File

@ -1,21 +1,21 @@
background #f8f8f8 background #000000
foreground #2a2b33 foreground #fffaf3
cursor #bbbbbb cursor #ffffff
selection_background #ececec selection_background #002a3a
color0 #000000 color0 #222222
color8 #000000 color8 #444444
color1 #de3d35 color1 #ff000f
color9 #de3d35 color9 #ff273f
color2 #3e953a color2 #8ce00a
color10 #3e953a color10 #abe05a
color3 #d2b67b color3 #ffb900
color11 #d2b67b color11 #ffd141
color4 #2f5af3 color4 #008df8
color12 #2f5af3 color12 #0092ff
color5 #950095 color5 #6c43a5
color13 #a00095 color13 #9a5feb
color6 #3e953a color6 #00d7eb
color14 #3e953a color14 #67ffef
color7 #bbbbbb color7 #ffffff
color15 #ffffff color15 #ffffff
selection_foreground #f8f8f8 selection_foreground #0d0f18

View File

@ -1314,6 +1314,6 @@ map kitty_mod+minus change_font_size all -2.0
# BEGIN_KITTY_THEME # BEGIN_KITTY_THEME
# Atom One Light # Argonaut
include current-theme.conf include current-theme.conf
# END_KITTY_THEME # END_KITTY_THEME

View File

@ -1314,6 +1314,6 @@ map kitty_mod+minus change_font_size all -2.0
# BEGIN_KITTY_THEME # BEGIN_KITTY_THEME
# Argonaut # Atom One Light
include current-theme.conf include current-theme.conf
# END_KITTY_THEME # END_KITTY_THEME

View File

@ -1,4 +0,0 @@
local map = vim.api.nvim_set_keymap
map("i", "<C-b>", ">a**<esc><i**<esc>", { noremap = true })

View File

@ -0,0 +1 @@
inoremap <c-b> ****<left><left>

View File

@ -23,7 +23,6 @@ if u.has_plugin("packer") then
require "configs.command-center" require "configs.command-center"
require "configs.notify" require "configs.notify"
require "configs.lsp" require "configs.lsp"
require "configs.lspinstaller"
require "configs.telescope" require "configs.telescope"
require "configs.tree" require "configs.tree"
require "configs.treesitter" require "configs.treesitter"

View File

@ -1,5 +1,5 @@
local command_center = require("command_center") local command_center = require("command_center")
local noremap = {noremap = true} local noremap = { noremap = true }
command_center.add({ command_center.add({
{ {
@ -24,8 +24,11 @@ command_center.add({
{ {
description = "Show function signaure (hover)", description = "Show function signaure (hover)",
cmd = "lua vim.lsp.buf.hover()", cmd = "lua vim.lsp.buf.hover()",
},{ }, {
description="(TS) Organize Imports", description = "(TS) Organize Imports",
cmd = "OrganizeImports" cmd = "OrganizeImports"
}, {
description = "ZenMode",
cmd = "<CMD>ZenMode<CR>"
} }
}) })

View File

@ -1,58 +1,17 @@
local lsp = require "lspconfig" local lsp_installer = require("nvim-lsp-installer")
local lsp_status = require("lsp-status") lsp_installer.setup {
-- local ts_utils = require("nvim-lsp-ts-utils") ensure_installed = { "sumneko_lua", "jsonls", "tsserver", "svelte", "cssls" }
require 'nvim-lightbulb'.setup {
-- LSP client names to ignore
-- Example: {"sumneko_lua", "null-ls"}
ignore = {},
sign = {
enabled = true,
-- Priority of the gutter sign
priority = 10,
},
float = {
enabled = false,
-- Text to show in the popup float
text = "💡",
-- Available keys for window options:
-- - height of floating window
-- - width of floating window
-- - wrap_at character to wrap at for computing height
-- - max_width maximal width of floating window
-- - max_height maximal height of floating window
-- - pad_left number of columns to pad contents at left
-- - pad_right number of columns to pad contents at right
-- - pad_top number of lines to pad contents at top
-- - pad_bottom number of lines to pad contents at bottom
-- - offset_x x-axis offset of the floating window
-- - offset_y y-axis offset of the floating window
-- - anchor corner of float to place at the cursor (NW, NE, SW, SE)
-- - winblend transparency of the window (0-100)
win_opts = {},
},
virtual_text = {
enabled = false,
-- Text to show at virtual text
text = "💡",
-- highlight mode to use for virtual text (replace, combine, blend), see :help nvim_buf_set_extmark() for reference
hl_mode = "replace",
},
status_text = {
enabled = false,
-- Text to provide when code actions are available
text = "💡",
-- Text to provide when no actions are available
text_unavailable = ""
}
} }
local lsp = require "lspconfig"
local lsp_format = require("lsp-format");
lsp_format.setup {}
local runtime_path = vim.split(package.path, ";") local runtime_path = vim.split(package.path, ";")
table.insert(runtime_path, "lua/?.lua") table.insert(runtime_path, "lua/?.lua")
table.insert(runtime_path, "lua/?/init.lua") table.insert(runtime_path, "lua/?/init.lua")
lsp.sumneko_lua.setup { lsp.sumneko_lua.setup {
on_attach = lsp_format.on_attach,
settings = { settings = {
Lua = { Lua = {
runtime = { runtime = {
@ -77,5 +36,43 @@ lsp.sumneko_lua.setup {
} }
} }
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
lsp.jsonls.setup {
capabilities = capabilities,
on_attach = lsp_format.on_attach,
settings = {
json = {
schemas = {
{
description = 'TypeScript compiler configuration file',
fileMatch = { 'tsconfig.json', 'tsconfig.*.json' },
url = 'http://json.schemastore.org/tsconfig'
},
{
description = 'ESLint config',
fileMatch = { '.eslintrc.json', '.eslintrc' },
url = 'http://json.schemastore.org/eslintrc'
},
{
description = 'Prettier config',
fileMatch = { '.prettierrc', '.prettierrc.json', 'prettier.config.json' },
url = 'http://json.schemastore.org/prettierrc'
},
}
},
}
}
lsp.svelte.setup {
on_attach = lsp_format.on_attach
}
lsp.tsserver.setup {
on_attach = lsp_format.on_attach
}
-- Ltex Language Server -- Ltex Language Server
require("grammar-guard").init() require("grammar-guard").init()

View File

@ -1,34 +0,0 @@
local lsp_installer = require("nvim-lsp-installer")
local lsp_format = require("lsp-format");
lsp_format.setup {}
local function organize_imports()
local params = {
command = "_typescript.organizeImports",
arguments = {vim.api.nvim_buf_get_name(0)},
title = ""
}
vim.lsp.buf.execute_command(params)
end
lsp_installer.on_server_ready(
function(server)
local opts = {
on_attach = lsp_format.on_attach
}
if server.name == "tsserver" then
opts.commands = {
OrganizeImports = {
organize_imports,
description = "Organize Imports"
}
}
end
-- This setup() function is exactly the same as lspconfig's setup function (:help lspconfig-quickstart)
server:setup(opts)
end
)

View File

@ -22,8 +22,6 @@ augroup SaveManualFolds
augroup END augroup END
]] ]]
vim.cmd [[autocmd CursorHold,CursorHoldI * lua require'nvim-lightbulb'.update_lightbulb()]]
vim.api.nvim_create_autocmd("BufWritePre", { vim.api.nvim_create_autocmd("BufWritePre", {
callback = function() callback = function()
vim.lsp.buf.formatting_sync(); vim.lsp.buf.formatting_sync();

View File

@ -12,10 +12,11 @@ return require("packer").startup(
use "nvim-lualine/lualine.nvim" use "nvim-lualine/lualine.nvim"
-- Layout Plugins -- Layout Plugins
use { "folke/zen-mode.nvim", config = function() require("zen-mode").setup {} end }
use "rcarriga/nvim-notify"
use "kyazdani42/nvim-web-devicons" use "kyazdani42/nvim-web-devicons"
use "kyazdani42/nvim-tree.lua" use "kyazdani42/nvim-tree.lua"
use "nvim-lua/popup.nvim" use "nvim-lua/popup.nvim"
-- use "mhinz/vim-startify"
use 'goolord/alpha-nvim' use 'goolord/alpha-nvim'
use { "terrortylor/nvim-comment", config = function() require('nvim_comment').setup() end } use { "terrortylor/nvim-comment", config = function() require('nvim_comment').setup() end }
use "windwp/nvim-autopairs" use "windwp/nvim-autopairs"
@ -25,13 +26,6 @@ return require("packer").startup(
use "nvim-telescope/telescope.nvim" use "nvim-telescope/telescope.nvim"
use "gfeiyou/command-center.nvim" use "gfeiyou/command-center.nvim"
-- Postman like features
-- use "NTBBloodbath/rest.nvim"
-- Obsidian / Roam like features
-- use "lervag/wiki.vim"
use "rcarriga/nvim-notify"
-- Lsp Errors -- Lsp Errors
use "folke/lsp-colors.nvim" use "folke/lsp-colors.nvim"
@ -45,6 +39,7 @@ return require("packer").startup(
} }
-- Syntax / Autocomplete -- Syntax / Autocomplete
use "tpope/vim-surround"
use "neovim/nvim-lspconfig" use "neovim/nvim-lspconfig"
use "hrsh7th/nvim-cmp" use "hrsh7th/nvim-cmp"
use "hrsh7th/cmp-nvim-lsp" use "hrsh7th/cmp-nvim-lsp"
@ -57,7 +52,6 @@ return require("packer").startup(
use "L3MON4D3/LuaSnip" use "L3MON4D3/LuaSnip"
use "saadparwaiz1/cmp_luasnip" use "saadparwaiz1/cmp_luasnip"
use "williamboman/nvim-lsp-installer" use "williamboman/nvim-lsp-installer"
use "nvim-lua/lsp-status.nvim"
use "brymer-meneses/grammar-guard.nvim" use "brymer-meneses/grammar-guard.nvim"
use { use {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",

1
configs/nvim/lua/lua Symbolic link
View File

@ -0,0 +1 @@
/home/max/.dotfiles/configs/lua