GithubHelp home page GithubHelp logo

code-links's People

Contributors

asaayers avatar gitter-badger avatar kutyel avatar mark-hahn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

code-links's Issues

web url links?

Would it make sense to have links to web pages using my web-browser? If so can you point me to example code to add the capability? Or someone else could add it. (grin) Opening a web page takes one line of code.

newbie question

Why is the link recognized in line 2 but not in line 1?

url = 'http://atom.io';
let jsProcessor = require('http://atom.io');

Deprecated selector in `code-links\styles\code-links.less`

In code-links\styles\code-links.less:

Starting from Atom v1.13.0, the contents of atom-text-editor elements are no longer encapsulated within a shadow DOM boundary. This means you should stop using :host and ::shadow pseudo-selectors, and prepend all your syntax selectors with syntax--. To prevent breakage with existing style sheets, Atom will automatically upgrade the following selectors:

  • body.code-links-visible atom-text-editor::shadow .code-links .region => body.code-links-visible atom-text-editor.editor .code-links .region

Automatic translation of selectors will be removed in a few release cycles to minimize startup time. Please, make sure to upgrade the above selectors as soon as possible.

Workspace.getEditors is deprecated.

Use Workspace::getTextEditors instead

Workspace.getEditors (/usr/share/atom/resources/app.asar/src/workspace.js:954:7)
Object.onProvidersChanged (/home/asa/.atom/packages/code-links/lib/code-links.js:140:24)
Object.consumeLinkProviderV0 (/home/asa/.atom/packages/code-links/lib/code-links.js:128:14)
Provider.provide (/usr/share/atom/resources/app.asar/node_modules/service-hub/lib/provider.js:30:34)

how to use nested folder using @extends keyword in laravel. i have a folder like this in my project

-view
--frontend
---includes
----head.blade.php
----footer.blade.php
----header.blade.php
---pages
----template_parts
-----_info_about_blog.blade.php
-----_info_service_blog.blade.php
----home.blade.php
----about.blade.php
--default.blade.php

now i have code in this way
default.blade.php
{{---start like this---

@include('frontend.includes.head') @include('frontend.includes.header') @yield('body') @include('frontend.includes.footer') <script src="{{url('public/frontend/lib/jquery/jquery.min.js')}}"></script> <script src="{{url('public/frontend/lib/jquery/jquery-migrate.min.js')}}"></script> <script src="{{url('public/frontend/lib/bootstrap/js/bootstrap.bundle.min.js')}}"></script> <script src="{{url('public/frontend/lib/easing/easing.min.js')}}"></script> <script src="{{url('public/frontend/lib/mobile-nav/mobile-nav.js')}}"></script> <script src="{{url('public/frontend/lib/wow/wow.min.js')}}"></script> <script src="{{url('public/frontend/lib/waypoints/waypoints.min.js')}}"></script> <script src="{{url('public/frontend/lib/counterup/counterup.min.js')}}"></script> <script src="{{url('public/frontend/lib/owlcarousel/owl.carousel.min.js')}}"></script> <script src="{{url('public/frontend/lib/isotope/isotope.pkgd.min.js')}}"></script> <script src="{{url('public/frontend/lib/lightbox/js/lightbox.min.js')}}"></script> <script src="{{url('public/frontend/contactform/contactform.js')}}"></script> <script src="{{url('public/frontend/js/main.js')}}"></script>

--}}}}}}

home.blade.php
{{--start like this

@extends('frontend.default')
@section('body')

Rapid Solutions
for Your Business!

        <div class="col-md-6 intro-img order-md-last order-first">
            <img src="{{url('public/frontend/img/intro-img.svg')}}" alt="" class="img-fluid">
        </div>
    </div>
</div>
@yield('info_about') @endsection

}}}}}}}}

and
_info_about_blog.blade.php

{{--start like this

@extends('frontend.pages.home')
@section('info_about')

<div class="container">
    <div class="row">

        <div class="col-lg-5 col-md-6">
            <div class="about-img">
                <img src="{{url('public/frontend/img/about-img.jpg')}}" alt="">
            </div>
        </div>

        <div class="col-lg-7 col-md-6">
            <div class="about-content">
                <h2>About Us</h2>
                <h3>Odio sed id eos et laboriosam consequatur eos earum soluta.</h3>
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
                <p>Aut dolor id. Sint aliquam consequatur ex ex labore. Et quis qui dolor nulla dolores neque. Aspernatur consectetur omnis numquam quaerat. Sed fugiat nisi. Officiis veniam molestiae. Et vel ut quidem alias veritatis repudiandae ut fugit. Est ut eligendi aspernatur nulla voluptates veniam iusto vel quisquam. Fugit ut maxime incidunt accusantium totam repellendus eum error. Et repudiandae eum iste qui et ut ab alias.</p>
                <ul>
                    <li><i class="ion-android-checkmark-circle"></i> Ullamco laboris nisi ut aliquip ex ea commodo consequat.</li>
                    <li><i class="ion-android-checkmark-circle"></i> Duis aute irure dolor in reprehenderit in voluptate velit.</li>
                    <li><i class="ion-android-checkmark-circle"></i> Ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate trideta storacalaperda mastiro dolore eu fugiat nulla pariatur.</li>
                </ul>
            </div>
        </div>
    </div>
</div>
@endsection

}}}}}

here now for _info_about_blog.blade.php dont whow in home.blade.php. i have using @yield('info_about') in home.blade.php and.
here i have use @extends keywords in
_info_about_blog.blade.php
but my content _info_about_blog information dont show in home page in out put result....

how can i solve it please help me i will be so thank full to all github member please .. help me

Extend process interface to get filepath, or better TextBuffer

Original thread:

https://discuss.atom.io/t/position-of-mouse-click/15958/6

To clarify, I'm building integration with Ensime (https://github.com/ensime/ensime-server/) to try to get a full-fletched Scala IDE in Atom. Ensime is a client/server solution where a server works as a provider of IDE-related data. The server is started with a reference to the projects file location and then the editor/client can ask questions like "give me code-completions at this point of this file" and such.

I now have a very simple "jump-to-defintion" with keystrokes and also mouse-click. Mouse clicks are just implemented like so:

@subscriber.subscribe @scroll, 'mousedown', (e) =>
      {detail, shiftKey, metaKey, ctrlKey, altKey} = e
      pixelPt = pixelPositionFromMouseEvent(@editor, e)
      screenPt = @editor.screenPositionForPixelPosition(pixelPt)
      bufferPt = @editor.bufferPositionForScreenPosition(screenPt)
      buffer = @editor.getBuffer()
      if(altKey) then @client.goToTypeAtPoint(buffer, bufferPt)

where

sendAndThen: (msg, callback) =>
    swankMsg = buildMessage("(:swank-rpc #{msg} #{@ensimeMessageCounter})")
    @callbackMap[@ensimeMessageCounter++] = callback
    @socket.write(swankMsg)


  goToTypeAtPoint: (textBuffer, bufferPosition) =>
    offset = textBuffer.characterIndexForPosition(bufferPosition)
    file = textBuffer.getPath()
    @sendAndThen("(swank:type-at-point \"#{file}\" #{offset})", (msg) ->
      # (:return (:ok (:arrow-type nil :name "Ingredient" :type-id 3 :decl-as class :full-name "se.kostbevakningen.model.record.Ingredient" :type-args nil :members nil :pos (:type offset :file "/Users/viktor/dev/projects/kostbevakningen/src/main/scala/se/kostbevakningen/model/record/Ingredient.scala" :offset 545) :outer-type-id nil)) 3)
      pos = msg[":ok"]?[":pos"]
      targetFile = pos[":file"]
      targetOffset = pos[":offset"]
      console.log("targetFile: #{targetFile}")
      atom.workspace.open(targetFile).then (editor) ->
        targetEditorPos = editor.getBuffer().positionForCharacterIndex(parseInt(targetOffset))
        editor.setCursorScreenPosition(targetEditorPos)

It would be cooler to use code-links to mark out the links, but then I need the TextBuffer, not the contents to call this method:

https://github.com/ensime/ensime-server/blob/master/swank/src/main/scala/org/ensime/server/protocol/swank/SwankProtocol.scala#L1302

which I could use to get a list of all the symbols of a file.

HTMLElement.shadowRoot is deprecated.

The contents of atom-text-editor elements are no longer encapsulated
within a shadow DOM boundary. Please, stop using shadowRoot and access
the editor contents directly instead.

HTMLElement.shadowRoot (C:\Users\DELL\AppData\Local\atom\app-1.34.0\resources\app.asar\src\text-editor-element.js:13:10)
Object.setupClickHandler (C:\Users\DELL\.atom\packages\code-links\lib\code-links.js:191:26)
<unknown> (C:\Users\DELL\.atom\packages\code-links\lib\code-links.js:78:19)
onDidAddTextEditor (<embedded>:11:428105)
Function.simpleDispatch (<embedded>:11:1172318)
Emitter.emit (<embedded>:11:1173759)

Follow links in PHP files?

I forked this in the hopes that I could easily get it working in PHP files, which I think have a similar syntax for require as JS.

As far as I can tell, your code in javascript-processor.js is just looking for string literals that are relative paths (ie start with ./ or ../), yes? If so, then that should be able to work for require() statements in PHP as well. But I am no Atom hacker and can't figure out how to even get it parse/decorate the strings in a .php file.

Any chance you could give me a hint to get me started?

New Display Mode: None

Hi!

I think there must be a 'none' option for the displayMode as people might not want to see the underlined links, this part I can manage myself and make a PR, however there is other feature that could improve very much the plugin:

In many famous editors, when you press the modifier key, the mouse pointer turns into a hand when it is over the selectable variables and function declarations, achieving this within this plugin would be great!

Is this even posible? I guess you are turning the atom lines into real <a href="#"></a>, any help on this?

Thanks in advance!

Failed to activate the code-links package

[Enter steps to reproduce below:]

  1. activate package

Atom Version: 0.194.0 ⚠️ in 1.0 API Preview Mode ⚠️
System: Mac OS X 10.10.3
Thrown From: code-links package, v0.3.8

Stack Trace

Failed to activate the code-links package

At undefined is not a function

TypeError: undefined is not a function
  at Object.onProvidersChanged (/Users/tomwganem/.atom/packages/code-links/lib/code-links.js:140:24)
  at Object.consumeLinkProviderV0 (/Users/tomwganem/.atom/packages/code-links/lib/code-links.js:128:14)
  at Provider.module.exports.Provider.provide (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/service-hub/lib/provider.js:30:34)
  at ServiceHub.module.exports.ServiceHub.consume (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/service-hub/lib/service-hub.js:48:18)
  at Package.module.exports.Package.activateServices (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:350:69)
  at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:225:16)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:203:30
  at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:147:15)
  at Package.module.exports.Package.activate (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:195:14)
  at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:434:21)
  at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-manager.js:276:29
  at exit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-manager.js:43:16)
  at BufferedProcess.triggerExitCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:63:47)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:77:18
  at Socket.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:150:18)
  at emitOne (events.js:82:20)
  at Socket.emit (events.js:166:7)
  at Pipe.close (net.js:464:12)

Commands

     -3:45.1.0 core:backspace (atom-text-editor.editor)
     -3:43.5.0 core:move-right (atom-text-editor.editor)
     -3:39 core:copy (atom-text-editor.editor)
     -3:37.7.0 editor:newline (atom-text-editor.editor)
     -3:37.5.0 core:paste (atom-text-editor.editor)
  2x -3:32.8.0 core:move-up (atom-text-editor.editor)
  4x -3:32.2.0 core:move-left (atom-text-editor.editor)
     -3:31.1.0 core:backspace (atom-text-editor.editor)
     -3:29.8.0 core:move-down (atom-text-editor.editor)
  2x -3:29.6.0 core:move-right (atom-text-editor.editor)
     -3:29.2.0 core:move-down (atom-text-editor.editor)
     -3:29 core:move-right (atom-text-editor.editor)
  7x -3:26.7.0 core:move-down (atom-text-editor.editor)
     -3:23.3.0 core:move-up (atom-text-editor.editor)
  4x -3:22.8.0 core:backspace (atom-text-editor.editor)
  2x -3:08.0 core:confirm (atom-text-editor.editor.mini)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "monokai"
    ],
    "disabledPackages": [
      "vim-mode",
      "git-plus",
      "Zen",
      "git-difftool",
      "tabular",
      "autoclose-html",
      "minimap-color-highlight",
      "terminal-panel",
      "regex-railroad-diagram",
      "git-show",
      "symbols-view",
      "git-diff-popup",
      "coffee-lint"
    ]
  }
}

Installed Packages

# User
angularjs, v0.1.0
atom-ctags, v3.2.0
autocomplete-paths, v1.0.2
autocomplete-plus, v2.12.1
autocomplete-ruby, v0.1.0
code-links, v0.3.8
coffee-links, v0.1.0
coffee-navigator, v0.0.16
editor-stats, v0.17.0
javascript-snippets, v1.0.0
language-jade, v0.4.0
language-javascript-semantic, v0.1.0
last-cursor-position, v0.9.0
linter, v0.12.1
linter-ruby, v0.1.4
minimap, v4.7.6
minimap-git-diff, v4.1.2
monokai, v0.14.0
ruby-block, v0.3.3
todo-show, v0.8.0

# Dev
No dev packages

ctrl-clicking adds a cursor

Ctrl-clicking on a link adds a cursor to the document. Maybe just stopping propagation would be enough to fix this?

Babel support

I have started using flow type attributions for a few things and code-links stops working for that file.

It might be cool to have a babel plugin as it supports jsx and flow syntax

Failed to load the code-links package

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.1.0
System: Mac OS X 10.10.3
Thrown From: code-links package, v0.4.0

Stack Trace

Failed to load the code-links package

At Cannot find module 'espree'

Error: Cannot find module 'espree'
    at Module._resolveFilename (module.js:334:15)
    at Function.Module._resolveFilename (/Applications/Atom.app/Contents/Resources/app.asar/src/module-cache.js:383:52)
    at Function.Module._load (module.js:284:25)
    at Module.require (module.js:363:17)
    at require (module.js:382:17)
    at Object.<anonymous> (/Users/christian/.atom/packages/code-links/lib/javascript-processor.js:4:16)
    at Module._compile (module.js:428:26)
    at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:169:21)
    at Module.load (module.js:353:32)
    at Function.Module._load (module.js:308:12)

Commands

Config

{
  "core": {
    "disabledPackages": [
      "atom-ternjs"
    ]
  }
}

Installed Packages

# User
Sublime-Style-Column-Selection, v1.3.0
autosave, v0.23.0
code-links, v0.4.0
file-icons, v1.6.11
indent-guide-improved, v1.4.3
linter, v1.10.0
linter-eslint, v4.0.0

# Dev
No dev packages

ES6 module support

I use babel in my project and es6 modules as well.
So, in my code I use things like this:

import Router from '../../common/router';
import Radio from 'backbone.radio';

import IndexRoute from './index/route';
...

But your plugin doesn't work for links like this. It would be great if you include this functionality in your package.

Thanks!

Feature request: lighter style for underlines

Hi, first off thanks for this great package!

Using solid black underlines is a bit obtrusive, though: why not using dashed grey lines, or even let the user choose his/her own style?

Uncaught TypeError: undefined is not a function

I got this error and here is the information.

Atom Version: 1.0.7
System: Mac OS X 10.10.5
Thrown From: code-links package, v0.3.11

Stack Trace

Uncaught TypeError: undefined is not a function

At /Users/mfb/.atom/packages/code-links/lib/code-links.js:142

TypeError: undefined is not a function
    at Object.onProvidersChanged (/Users/mfb/.atom/packages/code-links/lib/code-links.js:142:24)
    at Object.consumeLinkProviderV0 (/Users/mfb/.atom/packages/code-links/lib/code-links.js:130:14)
    at Provider.module.exports.Provider.provide (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/service-hub/lib/provider.js:30:52)
    at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/service-hub/lib/service-hub.js:55:26
    at process._tickCallback (node.js:357:13)

Commands

     -0:12.9.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)

Config

{
  "core": {}
}

Installed Packages

# User
atom-jade, v0.3.0
code-links, v0.3.11
color-picker, v2.0.11

# Dev
No dev packages

Can't navigate into Class method

Hi,

thanks for great plugin! I want to inform you about problem, when I can't navigate into methods which are declared in class, see screenshot method aren't underlined.
code-links

Doesn't follow link?

This is a great idea, a feature I had been missing, but it's not working for me.

If I open a file with, eg const jsProcessor = require('./javascript-processor.js'); I get the blue underline in-between the single quotes, but ctrl+click only pops up my context menu.

What am I missing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.