diff --git a/global/.config/nvim/ftplugin/html.lua b/global/.config/nvim/ftplugin/html.lua
new file mode 100644
index 0000000..fb2884f
--- /dev/null
+++ b/global/.config/nvim/ftplugin/html.lua
@@ -0,0 +1,3 @@
+vim.bo.shiftwidth = 2
+vim.bo.expandtab = true
+vim.bo.tabstop = 2
diff --git a/global/.config/nvim/lua/core/options.lua b/global/.config/nvim/lua/core/options.lua
index 8aa3eea..67233f0 100644
--- a/global/.config/nvim/lua/core/options.lua
+++ b/global/.config/nvim/lua/core/options.lua
@@ -68,7 +68,7 @@ opt.clipboard:append("unnamedplus")
opt.modifiable = true
opt.encoding = "UTF-8"
opt.fileencoding = "utf-8"
-opt.cursorline = false
+opt.cursorline = true
-- spell
opt.spelllang = "en_us,ru"
diff --git a/global/.config/nvim/lua/plugins/conform.lua b/global/.config/nvim/lua/plugins/conform.lua
index 16a6397..a4d516d 100644
--- a/global/.config/nvim/lua/plugins/conform.lua
+++ b/global/.config/nvim/lua/plugins/conform.lua
@@ -13,6 +13,9 @@ return {
json = { "biome" },
sh = { "shfmt" },
markdown = { "prettier" },
+ css = { "prettier" },
+ html = { "prettier" },
+ htmldjango = { "prettier" },
["*"] = { "trim_whitespace", "codespell" },
},
format_on_save = {
diff --git a/global/.config/nvim/lua/plugins/lsp.lua b/global/.config/nvim/lua/plugins/lsp.lua
index b71801a..6d4dfe0 100644
--- a/global/.config/nvim/lua/plugins/lsp.lua
+++ b/global/.config/nvim/lua/plugins/lsp.lua
@@ -1,85 +1,114 @@
local config = function()
- local lsp_zero = require("lsp-zero")
local luasnip = require("luasnip")
- local diagnostic_signs = require("utils.icons").diagnostic_signs
- lsp_zero.on_attach(function(_, bufnr)
- vim.diagnostic.config({
- virtual_text = false, -- disable virtual text
- update_in_insert = true,
- underline = true,
- severity_sort = true,
- float = {
- focusable = true,
- style = "minimal",
- border = "rounded",
- source = true,
- header = "",
- prefix = "",
- },
- })
+ vim.diagnostic.config({
+ virtual_text = false, -- disable virtual text
+ update_in_insert = true,
+ underline = true,
+ severity_sort = true,
+ float = {
+ focusable = true,
+ style = "minimal",
+ border = "rounded",
+ source = true,
+ header = "",
+ prefix = "",
+ },
+ })
- vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
- border = "rounded",
- })
- vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
- border = "rounded",
- })
+ vim.keymap.set("n", "gd", function()
+ vim.lsp.buf.definition()
+ end)
+ vim.keymap.set("n", "Q", function()
+ vim.lsp.buf.hover()
+ end)
+ vim.keymap.set("n", "vws", function()
+ vim.lsp.buf.workspace_symbol()
+ end)
+ vim.keymap.set("n", "vd", function()
+ vim.diagnostic.open_float()
+ end)
+ vim.keymap.set("n", "[d", function()
+ vim.diagnostic.jump({count=-1, float=true})
+ end)
+ vim.keymap.set("n", "]d", function()
+ vim.diagnostic.jump({count=-1, float=true})
+ end)
+ vim.keymap.set("n", "ca", function()
+ vim.lsp.buf.code_action()
+ end)
+ vim.keymap.set("n", "vrr", function()
+ vim.lsp.buf.references()
+ end)
+ vim.keymap.set("n", "vrn", function()
+ vim.lsp.buf.rename()
+ end)
+ vim.keymap.set("i", "", function()
+ vim.lsp.buf.signature_help()
+ end)
+ vim.keymap.set("n", "gi", function()
+ vim.lsp.buf.implementation()
+ end)
+ -- nvim-lint
+ -- vim.keymap.set("n", "li", function()
+ -- require("lint").try_lint()
+ -- end)
+ -- conform
+ -- vim.keymap.set("n", "fr", function()
+ -- require("conform").format({ bufnr = bufnr })
+ -- end)
- local opts = { buffer = bufnr, remap = false }
+ -- vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
+ -- border = "rounded",
+ -- })
+ --
+ -- vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
+ -- border = "rounded",
+ -- })
- vim.keymap.set("n", "gd", function()
- vim.lsp.buf.definition()
- end, opts)
- vim.keymap.set("n", "K", function()
- vim.lsp.buf.hover()
- end, opts)
- vim.keymap.set("n", "vws", function()
- vim.lsp.buf.workspace_symbol()
- end, opts)
- vim.keymap.set("n", "vd", function()
- vim.diagnostic.open_float()
- end, opts)
- vim.keymap.set("n", "[d", function()
- vim.diagnostic.goto_next()
- end, opts)
- vim.keymap.set("n", "]d", function()
- vim.diagnostic.goto_prev()
- end, opts)
- vim.keymap.set("n", "ca", function()
- vim.lsp.buf.code_action()
- end, opts)
- vim.keymap.set("n", "vrr", function()
- vim.lsp.buf.references()
- end, opts)
- vim.keymap.set("n", "vrn", function()
- vim.lsp.buf.rename()
- end, opts)
- vim.keymap.set("i", "", function()
- vim.lsp.buf.signature_help()
- end, opts)
- vim.keymap.set("n", "gi", function()
- vim.lsp.buf.implementation()
- end, opts)
- -- nvim-lint
- vim.keymap.set("n", "li", function()
- require("lint").try_lint()
- end, opts)
- -- conform
- vim.keymap.set("n", "fr", function()
- require("conform").format({ bufnr = bufnr })
- end, opts)
- end)
+ vim.lsp.config('lua_ls', {
+ settings = {
+ Lua = {
+ runtime = {
+ -- Tell the language server which version of Lua you're using
+ version = 'LuaJIT',
+ },
+ diagnostics = {
+ -- Get the language server to recognize the `vim` global
+ globals = {'vim'}
+ },
+ workspace = {
+ checkThirdParty = false,
+ library = {
+ -- Make the server aware of Neovim runtime files
+ vim.env.VIMRUNTIME,
+ vim.fn.stdpath('config'),
+ },
+ },
+ }
+ }
+ })
- lsp_zero.set_sign_icons({
- error = diagnostic_signs.Error,
- warn = diagnostic_signs.Warn,
- hint = diagnostic_signs.Hint,
- info = diagnostic_signs.Info,
- })
+ vim.lsp.config('pyright', {
+ require("lspconfig").pyright.setup({
+ settings = {
+ python = {
+ analysis = {
+ typeCheckingMode = "off",
+ },
+ },
+ },
+ })
+ })
- require("mason").setup({})
+ -- vim.lsp.config('clangd', {
+ -- require("lspconfig").clangd.setup({
+ -- vim.b.lsp_zero_enable_autoformat = 0
+ -- })
+ -- })
+
+ require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = {
"bashls",
@@ -89,45 +118,13 @@ local config = function()
"jsonls",
"clangd",
"biome", -- will install for formatting only
- "marksman",
- "ruff",
+ -- "ruff",
-- "marksman",
},
- automatic_installation = true,
- handlers = {
- -- lsp_zero.default_setup,
- -- https://github.com/neovim/nvim-lspconfig/pull/3232
- function(server_name)
- if server_name == "tsserver" then
- server_name = "ts_ls"
- else
- lsp_zero.default_setup(server_name)
- end
- end,
- lua_ls = function()
- local lua_opts = lsp_zero.nvim_lua_ls()
- require("lspconfig").lua_ls.setup(lua_opts)
- end,
- pyright = function()
- require("lspconfig").pyright.setup({
- settings = {
- python = {
- analysis = {
- typeCheckingMode = "off",
- },
- },
- },
- })
- end,
- biome = function() -- use tsserver instead
- return {}
- end,
- clangd = function()
- vim.b.lsp_zero_enable_autoformat = 0
- end,
- require("lspconfig").marksman.setup({}),
- },
- })
+ automatic_enable = {
+ exclude = { "ruff", "biome" }
+ }
+ })
local cmp = require("cmp")
local cmp_select = { behavior = cmp.SelectBehavior.Select }
@@ -151,7 +148,7 @@ local config = function()
{ name = "nvim_lua" },
{ name = "buffer" },
},
- formatting = lsp_zero.cmp_format(),
+ -- formatting = lsp_zero.cmp_format(),
mapping = cmp.mapping.preset.insert({
-- [''] = cmp.mapping.select_prev_item(cmp_select),
[""] = cmp.mapping.select_next_item(cmp_select),
@@ -178,14 +175,12 @@ local config = function()
end
return {
- "VonHeikemen/lsp-zero.nvim",
- branch = "v3.x",
+ "neovim/nvim-lspconfig",
config = config,
lazy = false,
dependencies = {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
- "neovim/nvim-lspconfig",
"hrsh7th/nvim-cmp",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
diff --git a/global/.tmux.conf b/global/.tmux.conf
index 4fc1958..1bd0a6c 100755
--- a/global/.tmux.conf
+++ b/global/.tmux.conf
@@ -15,6 +15,9 @@ set -g default-terminal tmux-256color
set -sa terminal-features ',alacritty:RGB'
set -ga terminal-overrides ",*256col*:Tc"
+
+set -g pane-active-border-style 'fg=orange'
+
# reset gpg-agent password cache after close the pane (vimwiki diary)
set-hook -g window-unlinked 'run-shell "gpgconf --reload gpg-agent"'