feat: fix clipboard

This commit is contained in:
max_richter 2022-02-03 12:34:50 +01:00
parent 89e4ef3149
commit b33502bf54
6 changed files with 144 additions and 40 deletions

View File

@ -25,6 +25,7 @@ if u.has_plugin("cmp") then
g.hidden = true -- unload buffers when hidden g.hidden = true -- unload buffers when hidden
g.filetype = true -- execute autocommands based on filetype g.filetype = true -- execute autocommands based on filetype
opt.clipboard = {"unnamedplus"}
o.autoread = true o.autoread = true
opt.termguicolors = true opt.termguicolors = true
@ -85,10 +86,50 @@ if u.has_plugin("cmp") then
) )
require("telescope").setup { require("telescope").setup {
pickers = { defaults = {
find_files = { vimgrep_arguments = {
hidden = true "rg",
} "--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
"--smart-case"
},
prompt_prefix = "",
selection_caret = " ",
entry_prefix = " ",
initial_mode = "insert",
selection_strategy = "reset",
sorting_strategy = "ascending",
layout_strategy = "horizontal",
layout_config = {
horizontal = {
prompt_position = "top",
preview_width = 0.55,
results_width = 0.8
},
vertical = {
mirror = false
},
width = 0.87,
height = 0.80,
preview_cutoff = 120
},
file_sorter = require("telescope.sorters").get_fuzzy_file,
file_ignore_patterns = {"node_modules"},
generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,
path_display = {"truncate"},
winblend = 0,
border = {},
borderchars = {"", "", "", "", "", "", "", ""},
color_devicons = true,
use_less = true,
set_env = {["COLORTERM"] = "truecolor"}, -- default = nil,
file_previewer = require("telescope.previewers").vim_buffer_cat.new,
grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new,
qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new
-- Developer configurations: Not meant for general override
} }
} }

View File

@ -17,29 +17,13 @@ local function on_attach()
vim.api.nvim_buf_map(bufnr, "n", "gs", ":LspOrganize<CR>", {silent = true}) vim.api.nvim_buf_map(bufnr, "n", "gs", ":LspOrganize<CR>", {silent = true})
end end
local system_name = ""
-- Lua Language Server
if vim.fn.has("mac") == 1 then
system_name = "macOS"
elseif vim.fn.has("unix") == 1 then
system_name = "Linux"
elseif vim.fn.has("win32") == 1 then
system_name = "Windows"
else
print("Unsupported system for sumneko")
end
local sumneko_root_path = "/home/jim/.local/share/lua-language-server"
local sumneko_binary = sumneko_root_path .. "/bin/" .. system_name .. "/lua-language-server"
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 { print(runtime_path)
on_attach = on_attach,
capabilities = lsp_status.capabilities, require "lspconfig".sumneko_lua.setup {
cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"},
settings = { settings = {
Lua = { Lua = {
runtime = { runtime = {
@ -50,7 +34,7 @@ lsp.sumneko_lua.setup {
}, },
diagnostics = { diagnostics = {
-- Get the language server to recognize the `vim` global -- Get the language server to recognize the `vim` global
globals = {"vim", "bufnr", "use"} globals = {"vim"}
}, },
workspace = { workspace = {
-- Make the server aware of Neovim runtime files -- Make the server aware of Neovim runtime files
@ -67,7 +51,14 @@ lsp.sumneko_lua.setup {
-- Ltex Language Server -- Ltex Language Server
lsp.ltex.setup { lsp.ltex.setup {
ltex = { ltex = {
language = {"de", "en", "es"} completionEnabled = true,
language = {"de", "en", "es"},
configurationTarget = {},
statusBarItem = true,
dictionary = {
["de"] = {"~/test.txt"},
["en"] = {"~/test.txt"}
}
} }
} }

View File

@ -47,7 +47,7 @@ return require("packer").startup(
"folke/trouble.nvim", "folke/trouble.nvim",
requires = "kyazdani42/nvim-web-devicons", requires = "kyazdani42/nvim-web-devicons",
config = function() config = function()
require("trouble").setup() require("trouble").setup {}
end end
} }

View File

@ -0,0 +1,71 @@
local present, telescope = pcall(require, "telescope")
if not present then
return
end
local default = {
defaults = {
vimgrep_arguments = {
"rg",
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
"--smart-case"
},
prompt_prefix = "",
selection_caret = " ",
entry_prefix = " ",
initial_mode = "insert",
selection_strategy = "reset",
sorting_strategy = "ascending",
layout_strategy = "horizontal",
layout_config = {
horizontal = {
prompt_position = "top",
preview_width = 0.55,
results_width = 0.8
},
vertical = {
mirror = false
},
width = 0.87,
height = 0.80,
preview_cutoff = 120
},
file_sorter = require("telescope.sorters").get_fuzzy_file,
file_ignore_patterns = {"node_modules"},
generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,
path_display = {"truncate"},
winblend = 0,
border = {},
borderchars = {"", "", "", "", "", "", "", ""},
color_devicons = true,
use_less = true,
set_env = {["COLORTERM"] = "truecolor"}, -- default = nil,
file_previewer = require("telescope.previewers").vim_buffer_cat.new,
grep_previewer = require("telescope.previewers").vim_buffer_vimgrep.new,
qflist_previewer = require("telescope.previewers").vim_buffer_qflist.new,
-- Developer configurations: Not meant for general override
buffer_previewer_maker = require("telescope.previewers").buffer_previewer_maker
}
}
local M = {}
M.setup = function()
telescope.setup(default)
local extensions = {"themes", "terms"}
pcall(
function()
for _, ext in ipairs(extensions) do
-- telescope.load_extension(ext)
end
end
)
end
return M

View File

@ -1,17 +1,17 @@
local parser_configs = require("nvim-treesitter.parsers").get_parser_configs() -- local parser_configs = require("nvim-treesitter.parsers").get_parser_configs()
parser_configs.http = { -- parser_configs.http = {
install_info = { -- install_info = {
url = "https://github.com/NTBBloodbath/tree-sitter-http", -- url = "https://github.com/NTBBloodbath/tree-sitter-http",
files = {"src/parser.c"}, -- files = {"src/parser.c"},
branch = "main" -- branch = "main"
} -- }
} -- }
parser_configs.glsl = { -- parser_configs.glsl = {
filetype = "vert", -- filetype = "vert",
filetypes = {"vert", "frag"} -- filetypes = {"vert", "frag"}
} -- }
require "nvim-treesitter.configs".setup { require "nvim-treesitter.configs".setup {
indent = { indent = {

View File

@ -19,7 +19,6 @@ set $left h
set $down j set $down j
set $up k set $up k
set $right l set $right l
# Your preferred terminal emulator
# Some menus # Some menus
set $wofi_scripts ~/.config/wofi set $wofi_scripts ~/.config/wofi
@ -192,7 +191,9 @@ exec swayidle -w \
# Note: workspaces can have any name you want, not just numbers. # Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default. # We just use 1-10 as the default.
for_window [class="zoom"] floating enable
for_window [title="Zoom Meeting.*"] floating disable
for_window [title="Zoom Meeting.*"] inhibit_idle visible
# #
# Layout stuff: # Layout stuff: