Compare commits

...

7 Commits

Author SHA1 Message Date
8162e52832 noop the noops 2023-11-27 17:32:48 +00:00
f054ccd98c dap arghhh cmp 2023-11-26 12:57:56 -06:00
dc0eb7d2ad me 2023-11-24 00:12:03 -06:00
a35a261440 ts context 2023-11-24 00:00:10 -06:00
70b43e497b cmp sorting woot 2023-11-23 15:30:58 -06:00
b63ef26e3b nvim after 2023-11-21 17:49:50 -06:00
dfd59c76e0 zsh plugs 2023-11-21 17:08:01 +00:00
20 changed files with 307 additions and 96 deletions

View File

@ -1,4 +1,6 @@
set autoindent
set noexpandtab
set nowrap
set tabstop=4
set softtabstop=4
set shiftwidth=4
set noexpandtab

View File

@ -0,0 +1,3 @@
set tabstop=2
set softtabstop=2
set shiftwidth=2

View File

@ -8,6 +8,7 @@
"bufferline.nvim": { "branch": "main", "commit": "6ecd37e0fa8b156099daedd2191130e083fb1490" },
"catppuccin": { "branch": "main", "commit": "a8dfb969e76d1a0752d98b5347be9ffb9bca9592" },
"ciderlsp-nvim": { "branch": "main", "commit": "f4929e4e00c1136eb88fe685ffe8a9eb7c86dcd9" },
"clyde.vim": { "branch": "master", "commit": "368691fe856c09b0d064f34b35c856ddb196b391" },
"cmp-async-path": { "branch": "main", "commit": "d8229a93d7b71f22c66ca35ac9e6c6cd850ec61d" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" },
@ -25,6 +26,7 @@
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conflict-marker.vim": { "branch": "master", "commit": "11a4d42244755505b66b15cd4496a150432eb5e3" },
"crates.nvim": { "branch": "main", "commit": "1dffccc0a95f656ebe00cacb4de282473430c5a1" },
"debugprint.nvim": { "branch": "main", "commit": "95f0ef6d4f804df8d5790a2cbb91aa78f8f4877d" },
"firenvim": { "branch": "master", "commit": "138424db463e6c0e862a05166a4ccc781cd7c19d" },
"formatter.nvim": { "branch": "master", "commit": "91651e6afaf6f73b0ffb8b433c06cd4e06f90403" },
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
@ -56,6 +58,7 @@
"mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" },
"neo-tree-diagnostics.nvim": { "branch": "main", "commit": "483019d251c31acd14102bc279f938f98d9a3de6" },
"neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" },
"neodev.nvim": { "branch": "main", "commit": "f972d7e6cd21b691199565cfe3e6487e774a4e8f" },
"neoscopes": { "branch": "main", "commit": "470dff042004b93c10d262e8b0ad7bf6f703f86f" },
"neovim-ayu": { "branch": "master", "commit": "76dbf939b38e03ac5f9bd711ab3e434999f715c8" },
"neovim-throttle-debounce": { "branch": "main", "commit": "5247b097df15016ab31db672b77ec4938bb9cbfd" },
@ -63,6 +66,7 @@
"nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" },
"nvim-cmp-buffer-lines": { "branch": "master", "commit": "924ccc04dc5c919b6baa05d45818025baa82699a" },
"nvim-dap": { "branch": "master", "commit": "e154fdb6d70b3765d71f296e718b29d8b7026a63" },
"nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" },
"nvim-lightbulb": { "branch": "master", "commit": "8f00b89dd1b1dbde16872bee5fbcee2e58c9b8e9" },
"nvim-lint": { "branch": "master", "commit": "3a7c15331a57ba40a56f00f29173700af853fa03" },
"nvim-lspconfig": { "branch": "master", "commit": "addad5176dbbe8bcc82ef91c51c5f1bf6629ec2d" },

View File

@ -6,3 +6,5 @@ createApkDescriptor
setInstance
collsion_body
shake_decay
index
func/!

View File

@ -55,6 +55,7 @@ return {
"AndrewRadev/tagalong.vim",
"tversteeg/registers.nvim",
"jremmen/vim-ripgrep",
"viniciusgerevini/clyde.vim",
{ "andymass/vim-matchup", event = "VimEnter" },
-- Undo tree
{

View File

@ -1,7 +1,4 @@
local use_google = require("utils").use_google
local tprint = require("utils").tprint
local dump = require("utils").dump
local log = require("utils").log
local function compare_by_ciderlsp_score(entry1, entry2)
if entry1.completion_item.score ~= nil and entry2.completion_item.score ~= nil then
@ -18,20 +15,8 @@ end
return {
{
"Exafunction/codeium.vim",
event = "InsertEnter",
cond = not use_google(),
dependencies = {
"onsails/lspkind.nvim",
"hrsh7th/nvim-cmp",
},
config = function()
require("codeium").setup({})
end,
},
{
"hrsh7th/nvim-cmp",
event = "VimEnter",
event = { "InsertEnter", "CmdlineEnter" },
dependencies = {
"f3fora/cmp-spell",
"hrsh7th/cmp-buffer",
@ -39,6 +24,7 @@ return {
"hrsh7th/cmp-calc",
"onsails/lspkind.nvim",
"hrsh7th/cmp-cmdline",
"Exafunction/codeium.nvim",
"hrsh7th/cmp-emoji",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lsp-document-symbol",
@ -88,29 +74,31 @@ return {
cmp.setup({
preselect = cmp.PreselectMode.None,
sources = cmp.config.sources(require("utils").TableConcat({
{ name = "luasnip", priority = 8 },
{ name = "nvim_lsp", priority = 7 },
{ name = "async_path" },
{ name = "treesitter" },
{ name = "buffer" },
{ name = "calc" },
{ name = "crates" },
{ name = "emoji" },
{ name = "luasnip", priority = 8 },
{ name = "nvim_lsp", priority = 7 },
{ name = "spell" },
{ name = "treesitter" },
{ name = "buffer" },
}, conditionalSources)),
sorting = {
comparators = {
-- compare.score_offset, -- not good at all
compare.locality,
compare.recently_used,
compare.score, -- based on : score = score + ((#sources - (source_index - 1)) * sorting.priority_weight)
compare.offset,
--compare.order,
--compare.sort_text,
compare.order,
-- compare.scopes, -- what?
-- compare.sort_text,
-- compare.exact,
-- compare.kind,
-- compare.length,
-- compare.length, -- useless
},
},
formatting = {
format = lspkind.cmp_format({
menu = {
@ -147,14 +135,20 @@ return {
["<CR>"] = cmp.mapping.confirm({ select = true }),
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
-- elseif has_words_before() then
-- cmp.complete()
if #cmp.get_entries() == 1 then
cmp.confirm({ select = true })
else
fallback() -- The fallback function sends a already mapped key. In this case, it's probably `<Tab>`.
cmp.select_next_item()
end
elseif has_words_before() then
cmp.complete()
if #cmp.get_entries() == 1 then
cmp.confirm({ select = true })
end
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function()
if cmp.visible() then
cmp.select_prev_item()

View File

@ -0,0 +1,16 @@
local use_google = require("utils").use_google
return {
{
"Exafunction/codeium.nvim",
event = "VeryLazy",
-- event = "InsertEnter",
cond = not use_google(),
dependencies = {
"nvim-lua/plenary.nvim",
"hrsh7th/nvim-cmp",
},
config = function()
require("codeium").setup({})
end,
},
}

View File

@ -1,17 +1,20 @@
return {
"mfussenegger/nvim-dap",
dependencies = {
"rcarriga/nvim-dap-ui",
"nvim-telescope/telescope-dap.nvim",
},
keys = {
{ "<leader>do", ":lua require'dapui'.open()<CR>" },
-- { "<F5>", ":lua require'dap'.continue()<CR>" },
{ "<leader>dl", ":lua require'dap'.run_last()<CR>" },
{ "<leader>db", ":lua require'dap'.toggle_breakpoint()<CR>" },
{ "<leader>dB", ":lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: '))<CR>" },
{ "<leader>dlp", ":lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message: '))<CR>" },
{ "<leader>dr", ":lua require'dap'.repl.open()<CR>" },
{ "<leader>dt", ":Telescope dap configurations<CR>" },
},
config = function()
-- <leader>dl :lua require'dapui'.open()<CR>
-- <F5> :lua require'dap'.continue()<CR>
-- <leader>dl :lua require'dap'.run_last()<CR>
-- <leader>db :lua require'dap'.toggle_breakpoint()<CR>
-- <leader>dB :lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: '))<CR>
-- <leader>dlp :lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message: '))<CR>
-- <leader>dr :lua require'dap'.repl.open()<CR>
--
require("telescope").load_extension("dap")
local dap = require("dap")
dap.adapters.java = function(callback)
@ -25,14 +28,57 @@ return {
})
end
dap.adapters.godot = {
type = "server",
host = "127.0.0.1",
port = 6006,
}
dap.configurations.java = {
{
type = "java",
request = "attach",
name = "Debug (Attach) - Remote",
name = "Java - Attach Remote",
hostName = "127.0.0.1",
port = 5005,
},
}
dap.configurations.gdscript = {
{
name = "Godot - Launch Project",
type = "godot",
request = "launch",
project = "${workspaceFolder}",
additional_options = "",
},
{
name = "Godot - Launch Current File",
type = "godot",
request = "launch",
scene = "current",
project = "${workspaceFolder}",
additional_options = "",
},
{
name = "Godot - Attach to Godot",
type = "godot",
request = "attach",
address = "127.0.0.1",
port = 6007,
},
}
local dapui = require("dapui")
vim.cmd("set mouse=n")
dapui.setup()
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close()
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close()
end
end,
}

View File

@ -0,0 +1,11 @@
return {
"andrewferrier/debugprint.nvim",
opts = {},
-- Dependency only needed for NeoVim 0.8
dependencies = {
"nvim-treesitter/nvim-treesitter",
},
-- Remove the following line to use development versions,
-- not just the formal releases
version = "*",
}

View File

@ -56,6 +56,16 @@ return {
require("formatter.filetypes.cs").clangformat,
-- require("formatter.filetypes.cs").dotnetformat,
},
gdscript = {
function()
return {
exe = "gdformat",
args = {
"-l 100",
},
}
end,
},
xml = {
function()
return {

View File

@ -1,6 +1,10 @@
return {
"mfussenegger/nvim-lint",
config = function()
require("lint").linters_by_ft = {
gdscript = { "gdlint" },
}
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
callback = function()
require("lint").try_lint()

View File

@ -9,10 +9,6 @@ local deps = {
"ray-x/guihua.lua",
}
if not use_google() then
table.insert(deps, "Exafunction/codeium.nvim")
end
return {
{
"L3MON4D3/LuaSnip",
@ -77,7 +73,8 @@ return {
},
codeDescriptionSupport = true,
dataSupport = true,
-- layeredDiagnostics = true,
layeredDiagnostics = true,
documentSymbol = true,
}
capabilities = vim.tbl_extend("keep", capabilities or {}, lsp_status.capabilities)

View File

@ -0,0 +1,8 @@
return {
"folke/neodev.nvim",
config = function()
require("neodev").setup({
library = { plugins = { "nvim-dap-ui" }, types = true },
})
end,
}

View File

@ -1,4 +1,25 @@
return {
"PrestonKnopp/tree-sitter-gdscript",
{
"nvim-treesitter/nvim-treesitter-context",
config = function()
require("treesitter-context").setup({
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
line_numbers = true,
multiline_threshold = 20, -- Maximum number of lines to show for a single context
trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
mode = "cursor", -- Line used to calculate context. Choices: 'cursor', 'topline'
-- Separator between context and content. Should be a single character string, like '-'.
-- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
separator = nil,
zindex = 20, -- The Z-index of the context window
on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching
})
end,
},
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
@ -13,6 +34,7 @@ return {
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = false,
indent = { enable = true },
-- List of parsers to ignore installing (or "all")
-- ignore_install = { "" },
@ -42,6 +64,7 @@ return {
end
end,
<<<<<<< HEAD
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
@ -51,4 +74,16 @@ return {
})
end,
lazy = false,
},
=======
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = { "java", "kotlin" },
},
})
end,
lazy = false,
>>>>>>> 3251d2e (noop the noops)
}

View File

@ -0,0 +1,75 @@
return {
"PrestonKnopp/tree-sitter-gdscript",
{
"nvim-treesitter/nvim-treesitter-context",
config = function()
require("treesitter-context").setup({
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
line_numbers = true,
multiline_threshold = 20, -- Maximum number of lines to show for a single context
trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
mode = "cursor", -- Line used to calculate context. Choices: 'cursor', 'topline'
-- Separator between context and content. Should be a single character string, like '-'.
-- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
separator = nil,
zindex = 20, -- The Z-index of the context window
on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching
})
end,
},
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
require("nvim-treesitter.configs").setup({
-- A list of parser names, or "all" (the five listed parsers should always be installed)
ensure_installed = "all",
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = false,
indent = { enable = true },
-- List of parsers to ignore installing (or "all")
-- ignore_install = { "" },
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
highlight = {
enable = true,
-- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
-- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
-- the name of the parser)
-- list of language that will be disabled
-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
disable = function(lang, buf)
--TODO write a custom Java treesitter parser for comments
--@link
--
-- if lang == "java" then
-- return true
-- end
local max_filesize = 100 * 1024 -- 100 KB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = { "java", "kotlin" },
},
})
end,
lazy = false,
}

View File

@ -32,15 +32,8 @@ set autoindent
set wrap
set linebreak
set textwidth=79
set showbreak=
" use intelligent indentation for C
" configure tabwidth and insert spaces instead of tabs
set tabstop=4 " tab width is 4 spaces
set shiftwidth=4 " indent also with 4 spaces
set expandtab " expand tabs to spaces
set number
set showcmd
set cursorline
@ -160,13 +153,13 @@ endfun
filetype plugin indent on
syntax on
noremap <Up> <Nop>
noremap <Down> <Nop>
noremap <Left> <Nop>
noremap <Right> <Nop>
inoremap <Up> <Nop>
inoremap <Down> <Nop>
inoremap <Left> <Nop>
inoremap <Right> <Nop>
" noremap <Up> <Nop>
" noremap <Down> <Nop>
" noremap <Left> <Nop>
" noremap <Right> <Nop>
" inoremap <Up> <Nop>
" inoremap <Down> <Nop>
" inoremap <Left> <Nop>
" inoremap <Right> <Nop>
lua require("config.google")

View File

@ -202,3 +202,5 @@ bdoctor_modules() {
}
alias bisect=/google/data/ro/teams/tetralight/bin/bisect
alias copybara='/google/bin/releases/copybara/public/copybara/copybara'
complete -D -C /google/data/ro/users/sk/skaushik/www/public-tools/flagpick -o bashdefault -o default

View File

@ -15,7 +15,15 @@ fi
# RUN ZPLUG INSTALL AFTER CHANGING!!!!
zplug "lib/completion", from:oh-my-zsh
zplug "lib/history", from:oh-my-zsh
zplug "plugins/git", from:oh-my-zsh;
zplug "plugins/adb", from:oh-my-zsh;
zplug "plugins/bazel", from:oh-my-zsh;
zplug "plugins/docker-compose", from:oh-my-zsh;
zplug "plugins/docker", from:oh-my-zsh;
zplug "plugins/rsync", from:oh-my-zsh;
zplug "plugins/safepaste", from:oh-my-zsh;
zplug "zsh-users/zsh-syntax-highlighting", defer:2
zplug "mafredri/zsh-async", from:"github", use:"async.zsh"
zplug "zsh-users/zsh-autosuggestions"