all repos

init.lua @ 3c5504196c3045317451dc4086707aa4c65fa431

my nvim config
6 files changed, 50 insertions(+), 9 deletions(-)
reformat code and set stylua max line size to 80
Author: Smirnov Olexander ss2316544@gmail.com
Committed at: 2022-04-04 19:11:35 +0300
Parent: 4f77834
M lua/fk/lsp/init.lua

@@ -6,7 +6,9 @@ require "fk.lsp.null"

require("nvim-lsp-installer").on_server_ready(function(server) server:setup(require "fk.lsp.providers"(server, { on_attach = require "fk.lsp.attach", - capabilities = require("cmp_nvim_lsp").update_capabilities(vim.lsp.protocol.make_client_capabilities()), + capabilities = require("cmp_nvim_lsp").update_capabilities( + vim.lsp.protocol.make_client_capabilities() + ), flags = { debounce_text_changes = 150 }, })) vim.cmd [[ do User LspAttachBuffers ]]
M lua/fk/lsp/providers/init.lua

@@ -3,7 +3,11 @@ ---@param opts table

---@return table return function(server, opts) if server.name == "sumneko_lua" then - return vim.tbl_extend("force", opts, require("lua-dev").setup { lspconfig = server:get_default_options() }) + return vim.tbl_extend( + "force", + opts, + require("lua-dev").setup { lspconfig = server:get_default_options() } + ) end if server.name == "pyright" then
M lua/fk/plugin.lua

@@ -21,7 +21,11 @@ use { "numToStr/Comment.nvim", keys = { "gc" }, config = get_setup "Comment" }

-- git use { "lewis6991/gitsigns.nvim", config = get_config "fk.plugin.gitsigns" } - use { "TimUntersberger/neogit", cmd = "Neogit", config = get_config "fk.plugin.neogit" } + use { + "TimUntersberger/neogit", + cmd = "Neogit", + config = get_config "fk.plugin.neogit", + } -- language specific use { "~/code/gopher.nvim", ft = "go" }
M lua/fk/plugin/cmp.lua

@@ -10,7 +10,12 @@ },

} -- Autopairs -cmp.event:on("confirm_done", require("nvim-autopairs.completion.cmp").on_confirm_done { map_char = { tex = "" } }) +cmp.event:on( + "confirm_done", + require("nvim-autopairs.completion.cmp").on_confirm_done { + map_char = { tex = "" }, + } +) cmp.setup { snippet = {

@@ -58,12 +63,23 @@ ["<C-d>"] = cmp.mapping.scroll_docs(-4),

["<C-f>"] = cmp.mapping.scroll_docs(4), ["<C-Space>"] = cmp.mapping.complete(), ["<C-e>"] = cmp.mapping.close(), - ["<CR>"] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, select = false }, + ["<CR>"] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + select = false, + }, ["<Tab>"] = function(fallback) if cmp.visible() then cmp.select_next_item() elseif luasnip.expand_or_jumpable() then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-expand-or-jump", true, true, true), "") + vim.fn.feedkeys( + vim.api.nvim_replace_termcodes( + "<Plug>luasnip-expand-or-jump", + true, + true, + true + ), + "" + ) else fallback() end

@@ -72,7 +88,15 @@ ["<S-Tab>"] = function(fallback)

if cmp.visible() then cmp.select_prev_item() elseif luasnip.jumpable(-1) then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-jump-prev", true, true, true), "") + vim.fn.feedkeys( + vim.api.nvim_replace_termcodes( + "<Plug>luasnip-jump-prev", + true, + true, + true + ), + "" + ) else fallback() end
M lua/fk/plugin/telescope.lua

@@ -17,7 +17,14 @@ prompt_position = "top",

horizontal = { mirror = false }, vertical = { mirror = false }, }, - file_ignore_patterns = { ".git", "node_modules", "__pycache__", "target", "vendor", "env", ".bin" }, + file_ignore_patterns = { + "node_modules", + "__pycache__", + "target", + "vendor", + ".git", + ".bin", + }, winblend = 0, border = {}, borderchars = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },
M stylua.toml

@@ -1,4 +1,4 @@

-column_width = 140 +column_width = 80 line_endings = "Unix" indent_type = "Spaces" indent_width = 2